SOLVED

Adding Company Administrator group as Site Owner with PowerShell

Brass Contributor

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!

3 Replies
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

@Juan Carlos González Martín 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.

best response confirmed by JSlei (Brass Contributor)
Solution
Yeah 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.
1 best response

Accepted Solutions
best response confirmed by JSlei (Brass Contributor)
Solution
Yeah 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.

View solution in original post