Forum Discussion

Brittany Rutherford's avatar
Brittany Rutherford
Copper Contributor
Sep 09, 2016

Exception while executing code from PnP - CustomCssWeb

I just downloaded the CustomCssWeb project, and I just tried to run it on an Office 365 site I have. I am the tenant admin and site collection admin on that site, once I ran it and clicked the button to run the scenario, I got the following exception as shown in the attached image. 

 

"Acced Denied, you do not have permission to perform this action"

  • Can you uninstall the add-in by right clicking the SP project in VS. Once that's done try to deploy again using F5...you should get a prompt of SharePoint asking you to consent the add-in to use the permissions it requests. Without that consent done the add-in has no permissions, hence the access denied your seeing.

    • Brittany Rutherford's avatar
      Brittany Rutherford
      Copper Contributor

      Thanks Bert. I ran the project using F5, it asked me to trust a certificate for the project locally. Then when it opened SharePoint, it asked me to trust this App, which I did.

      • BertJansen's avatar
        BertJansen
        Icon for Microsoft rankMicrosoft

        Which platform are you targetting: SPO?

        Which browser are you launching when you press F5 in Visual Studio?

        Are you a site collection administrator of the site you're installing into and is that site a developer site collection?

         

         

Resources