Forum Discussion
JSlei
Apr 16, 2019Brass Contributor
Adding Company Administrator group as Site Owner with PowerShell
Hi all, Does anyone know how to add the group Company Administrator as a site collection admin using Powershell since it is possible through the UI? Thank you!
- Apr 18, 2019Yeah Company Administrator is a built in Office 365 admin group, not part of Azure AD so you cannot reference it from SharePoint. You would have to create a security group in Azure AD / Groups and add your company admins into it, then use that instead.
Apr 17, 2019
You can use Set-SPOSite cmdlet (part of the SPO Management Shell) to do that...as an alternative you can also take a look at PnP PowerShell cmdlets
- JSleiApr 17, 2019Brass Contributor
jcgonzalezmartin I tried both cmdlets and I can add any user I want but the issue is with the Company Administrator group. I'm not able to add it because it's more of a system group I think and I was wondering if anyone out there has tried this before.
- Apr 18, 2019Yeah Company Administrator is a built in Office 365 admin group, not part of Azure AD so you cannot reference it from SharePoint. You would have to create a security group in Azure AD / Groups and add your company admins into it, then use that instead.