[BUG] Get-PnPTenantSite : The remote server returned an error: (401) Unauthorized. Using App Registration #4577
-
Hello, Hope everyone is doing well, I am trying to get the data using the Get-PnPTenant site using app registration, I have applied the relevant Graph API App permissions to the App And even gave the application Share-point Admin and Global Admin Role as well. I am able to successfully connect to the Sharepoint Admin Center. However I do get warning signs to update the PnP Module despite running the Update-Module multiple times as admin When I run the Get-PnPTenantID I do get my Tenant ID as the output however when it comes to the running the Get-PnPTenant I get the 401 error I am running this on my windows machine I similar bug was reported #3549 and the fix was to Set-SPOTenant -DisableCustomAppAuthentication $false However in this case since I have to use it to run on other tenants I may not be able to use the above command-let and need to leverage app registrations to get it to work If any one case point me in the right direction I would be greatful |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @pdrive29 , you need to provide SharePoint > Sites full control permissions for this . We used SP API under the hood |
Beta Was this translation helpful? Give feedback.
Hey @pdrive29 , you need to provide SharePoint > Sites full control permissions for this . We used SP API under the hood