Forum Discussion

JSlei's avatar
JSlei
Brass Contributor
Apr 16, 2019
Solved

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!

  • 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.
  • 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
    • JSlei's avatar
      JSlei
      Brass 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.

      • 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.

Resources