While working with SharePoint hosted add-in to access some data from SharePoint site collection you might get access denied issue. Recently while working in a sample SharePoint hosted add-in for our SharePoint online site, we got access denied issue like below:
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:
Solution:
We need to provide at least read access for the site collection.
Open the AppManifest.xml file in the SharePoint add-in project. The in the Scope select Site Collection and give Read permision like below:
Now when you deploy the 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.
Hope this will be helpful.
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:
Solution:
We need to provide at least read access for the site collection.
Open the AppManifest.xml file in the SharePoint add-in project. The in the Scope select Site Collection and give Read permision like below:
Now when you deploy the 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.
Hope this will be helpful.
0 on: "SharePoint hosted Add-in error Failed to get web title Error Access denied You do not have permission to perform this action or access this resource"