Forum Discussion

Deleted's avatar
Deleted
Sep 01, 2016

Auto Create the Office 365 Group Site Collection

Does anyone know if there is a way to programatically create the Office 365 Group File Store / Site Collection. Can obviously automate thegrou creation via New-UnifiedGroup. Plan is to create the site collection as well, add content types etc and fully automate the process. Just need to know if you can create the Group Site Collection?

10 Replies

  • It's been a while put there was a url we found in fiddler that starts the process. After provisioning the group, we hit that url then polled for the provisioning process to complete, then used sharegate's powershell to move in files. That url / process could change over time as it's not a documented api, but it's all i found to accomplish what you're trying to do.
    • Deleted's avatar
      Deleted

      Hi David - is it this kind of code you are using:

       

      $group = Get-UnifiedGroup -Identity "ALIAS"
      $extDirId = $newGroup.ExternalDirectoryObjectId
      $url = "https://TENANT.sharepoint.com/_layouts/15/groupstatus.aspx?id=" + $extDirId + "&target=documents" $wr = Invoke-WebRequest -Credential $creds -Uri $url

       

       

      • I think some code is missing since you are not creatig the Group...by the way, the Invoke-Request part is the one that should do the trick
    • Deleted's avatar
      Deleted

      Let's hope that when Groups get a Team Site by default then the site will actually be provisioned without any interaction. Mark-Kashman any news on that process?

  • Juan is right. When a Group is created, the process starts from Azure AD. Then different services are provisioned in what is described as forward syncing. At least that's how it was described in sessions last year at Ignite. Group creation in AD triggers other provisioning in services like SharePoint, Planner and Skype.
    It's best not to try to preempt the Site Collection provisioning process and create it yourself before the Group. I'm hoping to see PowerShell to associate a Group with an existing Site Collection. But based on today's announcements and discussion with Msft Product Group personalities, linking exisiting Site Colls is third in the release order.
    • Deleted's avatar
      Deleted

      See, what I am wanting to acheive is Group Functionality but the ability to provision Content Types and Site Columns to the Document Library. darrellaas jcgonzalezmartin

      • I believe you will be able once the Site Group is created...but this is something we will have to check
  • I don't think this is actually possible (at least currently) based on how a Group site is provisioned: It's not provisioned at the moment the Group is created...it's created the first time a Group member click the Files link or when there is a conversation that implies to upload a File to the Group

Resources