Getting this error:

Add-PnPCustomAction : Attempted to perform an unauthorized operation.

User has Admin level access on SharePoint Online. PnP PowerShell throws error. Please advice solution here.

  • User account has SharePoint administrator or Site collection administrator permissions? Are you able to perform other operations like Set-PnPSite? Can you add the code you are using to your question? Commented Sep 22, 2022 at 8:41
  • Would regrant permissions to the user help in your case?
    – Allen_MSFT
    Commented Sep 26, 2022 at 7:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.