Auto Create the Office 365 Group Site Collection

Deleted
Not applicable

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

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

Yeah was just thinking that. Hopfuly once the functionality hits, where a Group get a Team Site by default then that site is auto provisioned. This would be brilliant. 

 

In my case this is brilliant for managing projects. The last thing I need for this to be a killer is for that site to be there when the groups is created so I can add some CTypes and Site Columns......Bring it on!!!!!!

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.

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?

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
Thanks, not the real code. Most interested if the URL-part was correct or if there was any "better" URL to call.