Forum Discussion
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 Office Group to the Owners attribute using pnp as follows, but I get the error shown. Can anyone tell me what I'm doing wrong?
PS C:\scripts> Set-PnPTenantSite -Url https://premierinc.sharepoint.com/teams/dgtest1 -Owners "dgtest1@premierinc.onmicrosoft.com"
Set-PnPTenantSite : The user does not exist or is not unique.
At line:1 char:1
+ Set-PnPTenantSite -Url https://premierinc.sharepoint.com/teams/dgtest ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Set-PnPTenantSite], ServerException
+ FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.SetTenantSite