Forum Discussion
jean090681
Aug 21, 2019Copper Contributor
Add AD Security group as Site collection administrator - SPO
Is there a way to add a security group as Primary or secondary site collection administrator to all the sites in the tenant via PowerShell? I know this works for adding a user account to all the ...
- Aug 21, 2019That's not correct...you can add an AD Security Group as site collection admins with no problems and it can be also done through PS: https://kirkbarrett.wordpress.com/2016/04/04/adding-an-o365-security-group-to-the-site-collection-administrators-group/
Serkar
Oct 05, 2021Copper Contributor
Hi, there is the possibility to do it with the object ID of the security group:
Set-SPOUser -Site $SiteUrl -LoginName $Group -IsSiteCollectionAdmin $true
I have described it in detail here:
https://sposcripts.com/add-site-collection-administrator/