Having Trouble Granting Permissions to Azure AD App for SharePoint

0
19
Asked By TechSaver2023 On

I'm trying to give my Azure AD app permission to access a few SharePoint sites, but I'm hitting a snag that I can't seem to resolve. I've set up an Azure App Registration that has full control access to the SharePoint sites, and I use it frequently without issues. However, when I log into PnP PowerShell with this app registration and attempt to use the Grant-PnPAzureADAppSitePermission cmdlet, I receive an access denied error. The error reads: {"error":{"code":"accessDenied","message":"Access denied","innerError":{"date":"2025-07-07T15:25:50","request-id":"d6e54492-2f8f-4a7c-bf53-a836a09c07f0","client-request-id":"d6e54492-2f8f-4a7c-bf53-a836a09c07f0"}}}. I've confirmed that the PnP App registration has Sites.FullControl.All permissions, which I thought would prevent this type of error. Any help would be appreciated!

1 Answer

Answered By CodeNinja88 On

Have you tried allowing PnP PowerShell to generate its own client ID? Sometimes that can bypass issues with current registrations. It's worth a shot to see if the same error occurs!

TechSaver2023 -

What do you mean by generating its own client? I'm not sure how to do that.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.