Forum Discussion
Dean_Gross
Dec 19, 2018Silver Contributor
Unable to add Group as Owner
I'm trying to fix a problem that was caused by someone who replaced the Office Group in the Site Collection Admin group with a service account. I thought that I could do this by reassigning the Offic...
kristianbkjaer
Jun 17, 2019Copper Contributor
I had the same issue and struggled quite some time with a solution so thought I'd share.
You can use the full SharePoint id of the login like this:
$adminAccounts = @("myadminuser@abc.com", "c:0t.c|tenant|06f4bb89-36bc-464c-9d42-060da22d4ec4")
Set-PnPTenantSite -Url $sitecollection.Url -Owners $adminAccounts
I found the "user id" by adding the group in UI to some site and then use the get-pnpuser cmdlet to get the login name.
Hope this helps...