pnp / powershell

PnP PowerShell
https://pnp.github.io/powershell
MIT License
623 stars 329 forks source link

Add-PnPMicrosoft365GroupToSite: User does not have permissions to Groupify [BUG] #4066

Closed hajjkh closed 3 days ago

hajjkh commented 1 week ago

Reporting an Issue or Missing Feature

I have with my account "SharePoint Administrator" permissions. I created a SharePoint Teamsite from the admin center without M365 group. I try to groupify this SharePoint site by the command below:

connect-pnpOnline -Url "https://contoso.sharepoint.com/sites/FinanceTeamsite" -Interactive

Add-PnPMicrosoft365GroupToSite -Url "https://contoso.sharepoint.com/sites/FinanceTeamsite" -Alias "FinanceTeamsite" -DisplayName "My finance team site group"

I received the error:

Add-PnPMicrosoft365GroupToSite: User does not have permissions to Groupify

Expected behavior

I expect a groupified SharePoint site without error in the script

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

2.4.0

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

veronicageek commented 1 week ago

@hajjkh - I've tested with 2.5.0 and I can use the command successfully by being a SPO Admin + Site admin (on the site to groupify). Can you try again?