Skip to content

[BUG]Get-PnPTenantSite : The remote server returned an error: (401) Unauthorized. #3549

Closed
@SivaSadhu009

Description

@SivaSadhu009

Notice

Many bugs reported are actually related to the PnP Framework which is used behind the scenes. Consider carefully where to report an issue:
I have done the SharePoint app registration and provided below permissions to the Client Id.

When i am trying to get all the SharePoint sites, I am getting 401 Unauthorized error as below. Could you please help me? did i miss any steps?

Get-PnPTenantSite : The remote server returned an error: (401) Unauthorized.
At line:1 char:20

  • $siteCollections = Get-PnPTenantSite -Detailed | Select Title, URL
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (:) [Get-PnPTenantSite], WebException
    • FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.GetTenantSite

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions