pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
989 stars 662 forks source link

Set-PnPUnifiedGroup and Get-PnPUnifiedGroup are throwing "One or more errors occurred" #2842

Open markgort86 opened 4 years ago

markgort86 commented 4 years ago

Reporting an Issue or Missing Feature

Both cmdlets are throwing the error "One or more errors occurred" and are not working anymore

Expected behavior

Actual behavior

Get-PnPUnifiedGroup image Set-PnPUnifiedGroup image

Steps to reproduce behavior

Connect-PnPOnline -ClientID [value] -ClientSecret [value] -AADDomain [Value] or Connect-PnPOnline -AppId [Value] -AppSecret [Value] - AADDomain [Value]

Which version of the PnP-PowerShell Cmdlets are you using?

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

3.24.2008.0

How did you install the PnP-PowerShell Cmdlets?

markgort86 commented 4 years ago

@erwinvanhunen above issue only occurs when using Add-PnPOffice365GroupToSite before. it's reproducible on two tenants where Exchange Online not is configured. After i groupified a sitecollection and use Get-PnPUnifiedGroup the following error is visible in Fiddler: image

In Azure AD i don't see that there is something wrong with the newly created Office 365 group. On another tenant this is all working fine where Exchange Online is configured. With PnP module version (3.17.2001.1) the following output is visible when Get-PnPUnifiedGroup fails on both tenants where Exhange Online is not configured: image

Leif-Frederiksen commented 4 years ago

I get the same error when running just get-pnpunifiedgroup (in order to get ALL groups):

Connect-PnPOnline -Scopes  "Group.Read.All"
$groups = Get-PnPUnifiedGroup
markgort86 commented 4 years ago

I get the same error when running just get-pnpunifiedgroup (in order to get ALL groups):

Connect-PnPOnline -Scopes  "Group.Read.All"
$groups = Get-PnPUnifiedGroup

@Leif-Frederiksen Did you gave the PnP Management Shell the required permissions? And are you getting the access denied error in Fiddler (at the Graph API request?

If i run the second Cmdlet after i connect with the application registration and look at the fiddler logs i get around 10 groups successfully but as soon there is an access denied error in Fiddler, PowerShell throws the error and the Cmdlet stops running.