This SharePoint Apps or Add-in tutorial explains, how to resolve access denied issue which comes while accessing SharePoint add-in.
Recently we were doing a sample SharePoint hosted add-in for our SharePoint Online site. We were trying to get the web title inside the add-in. We developed and deployed the add-in to SharePoint Online site. But when click on the add-in it gave below error.
The error comes as:
Failed to get web title. Error. Access denied. You do not have permission to perform this action or access this resource. See fig below:
Failed to get web title Error Access denied
We need to provide at least read access for the site collection in SharePoint.
Open the AppManifest.xml file in the SharePoint add-in project. The in the Scope select Site Collection and give Read permission like below:
Now when you deploy the SharePoint Add-in, it will ask you to trust the Add-in. Click on Trust It button and then you will be able to see the title without error.
You may like following SharePoint Apps tutorials:
- SharePoint Hosted Apps: Create Choice Type Column in SharePoint Online Office 365
- SharePoint Hosted Add-in: Send Email to SharePoint group using visual studio workflow
- Set up an On-Premise development environment for SharePoint Add-in or Apps development in SharePoint 2016/2013
- SharePoint Hosted Add-in: Send Email using visual studio workflow
- Remove SharePoint Add-in from Site Contents Page SharePoint Online
- Debug SharePoint Hosted or Provider hosted Add-in in a different browser in visual studio
This SharePoint tutorial, we learned how to solve Failed to get web title Error Access denied You do not have permission to perform this action or access this resource error which comes in SharePoint hosted add-in.
Bhawana Rathore is a Microsoft MVP (3 times in Office Apps & Services) and a passionate SharePoint Consultant, having around 10 years of IT experience in the industry, as well as in .Net technologies. She likes to share her technical expertise in EnjoySharePoint.com and SPGuides.com
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.