Here we will discuss 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 addin. We developed and deployed the add-in to SharePoint online site. But when click on the add-in it gave below error.
Also you can read some beautiful articles:
– How to update app registration in SharePoint online site?
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:
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.
Download FREE SharePoint 2019 Installation PDF Guide
This FREE PDF contains, Steps by step guide to install SharePoint 2019 Preview, prerequisites, hardware and software new features. First impression to SharePoint Server 2019 new modern site, modern lists and modern document libraries.