Exception while executing code from PnP - CustomCssWeb

%3CLINGO-SUB%20id%3D%22lingo-sub-11268%22%20slang%3D%22en-US%22%3EException%20while%20executing%20code%20from%20PnP%20-%20CustomCssWeb%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-11268%22%20slang%3D%22en-US%22%3E%3CP%3EI%20just%20downloaded%20the%20CustomCssWeb%20project%2C%20and%20I%20just%20tried%20to%20run%20it%20on%20an%20Office%20365%20site%20I%20have.%20I%20am%20the%20tenant%20admin%20and%20site%20collection%20admin%20on%20that%20site%2C%20once%20I%20ran%20it%20and%20clicked%20the%20button%20to%20run%20the%20scenario%2C%20I%20got%20the%20following%20exception%20as%20shown%20in%20the%20attached%20image.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22Acced%20Denied%2C%20you%20do%20not%20have%20permission%20to%20perform%20this%20action%22%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-14755%22%20slang%3D%22en-US%22%3ERe%3A%20Exception%20while%20executing%20code%20from%20PnP%20-%20CustomCssWeb%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-14755%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Bert%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20Visual%20Studio%202015%20with%20SPO.%20Default%20browser%20is%20Chrome.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20the%20tenant%20admin%2Fsite%20collection%20admin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-11985%22%20slang%3D%22en-US%22%3ERe%3A%20Exception%20while%20executing%20code%20from%20PnP%20-%20CustomCssWeb%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-11985%22%20slang%3D%22en-US%22%3E%3CP%3EWhich%20platform%20are%20you%20targetting%3A%20SPO%3F%3C%2FP%3E%0A%3CP%3EWhich%20browser%20are%20you%20launching%20when%20you%20press%20F5%20in%20Visual%20Studio%3F%3C%2FP%3E%0A%3CP%3EAre%20you%20a%20site%20collection%20administrator%20of%20the%20site%20you're%20installing%20into%20and%20is%20that%20site%20a%20developer%20site%20collection%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-11409%22%20slang%3D%22en-US%22%3ERe%3A%20Exception%20while%20executing%20code%20from%20PnP%20-%20CustomCssWeb%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-11409%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Bert.%20I%20ran%20the%20project%20using%20F5%2C%20it%20asked%20me%20to%20trust%20a%20certificate%20for%20the%20project%20locally.%20Then%20when%20it%20opened%20SharePoint%2C%20it%20asked%20me%20to%20trust%20this%20App%2C%20which%20I%20did.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-11404%22%20slang%3D%22en-US%22%3ERe%3A%20Exception%20while%20executing%20code%20from%20PnP%20-%20CustomCssWeb%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-11404%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20you%20uninstall%20the%20add-in%20by%20right%20clicking%20the%20SP%20project%20in%20VS.%20Once%20that's%20done%20try%20to%20deploy%20again%20using%20F5...you%20should%20get%20a%20prompt%20of%20SharePoint%20asking%20you%20to%20consent%20the%20add-in%20to%20use%20the%20permissions%20it%20requests.%20Without%20that%20consent%20done%20the%20add-in%20has%20no%20permissions%2C%20hence%20the%20access%20denied%20your%20seeing.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

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"

4 Replies
Highlighted

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.

Highlighted

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.

Highlighted

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?

 

 

Highlighted

Hi Bert, 

 

I am using Visual Studio 2015 with SPO. Default browser is Chrome.

 

I am the tenant admin/site collection admin