Skip to content

[BUG] Get-PnPTenant only works with DeviceLogin in PS7 #3452

@paylord

Description

@paylord

Reporting an Issue or Missing Feature

Get-PnPTenant in PS7 fails when connected using Interactive mode

Expected behavior

Expect Get-PnPTenant to return org properties

Actual behavior

In PS7.3
Connect-PnPOnline -Url $adminUrl -Interactive # Seems to work fine, can run Get-PnPTenantSite etc
Get-PnPTenant
Get-PnPTenant: Attempted to perform an unauthorized operation.

The above works fine in PS5.

Works fine in PS7 if I use DeviceLogin:
Connect-PnPOnline -Url $adminUrl -DeviceLogin
Get-PnPTenant # returns properties as expected

Steps to reproduce behavior

See above

What is the version of the Cmdlet module you are running?

PS7 = 2.2.0
PS5 = 1.12.0

Which operating system/environment are you running PnP PowerShell on?

  • [ X ] Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions