Forum Discussion
GihanMalith
Sep 10, 2024Copper Contributor
I'm unable to execute powershell command in SharePoint
When I execute the PowerShell command, I get a sign-in error. I have tested this in a couple of SharePoint tenants, but I'm unable to run the script. Also, previously, these scripts were working fine.
Unable to execute the "Connect-PnPOnline" command.
Please someone help with this.
- Did that answer your question?
- You could try "Register-PnPManagementShellAccess". You’ll be prompted to consent to a set of permissions. “Consent on behalf of your organization” and click on the “Accept” button.
https://www.sharepointdiary.com/2021/08/fix-connect-pnponline-aadsts65001-user-or-administrator-has-not-consented-to-use-the-application.html