Teams SharePoint Site Provisioning - Mixed behavior

Occasional Contributor

For context, we are looking at creating a one stop shop PowerShell script to create a Microsoft Team, add members, setup the basic settings we want and then based on the usage case for that team, put both the mailbox and SharePoint site on hold via eDiscovery.


The issue we have, is that not every team we create gets a fully provisioned SharePoint site until someone presses the "Files" tab in the teams client. - but this seems to be quite hit and miss. - (edited PowerShell Output below)


So, two questions:


1. What causes this behavior? is it expected? if you navigate to what should be the correct URL for one of the sites "Missing" a sharepointsiteurl entry, you'll get a 404 - go into the Teams client, press the files tab, and voila, shortly that URL then works and navigates to the SharePoint site. the fact that the site is auto provisioned 90% of the time makes this hard to account for in a script. (we can't put a URL on hold if it doesn't exist, and therefore isn't indexed)


2. Is there any way of "forcing" the creation of the SharePoint site? - I've tried using the various cmdlets to get for example a channels email address (and failed) in the hope sending an email to a channel would provision the site, as it has to store the email..


Any ideas / explanations as to what's happening under the hood welcome!


Thanks in advance.



6 Replies
Hi @Ben Harris,

This seems, according to the TC string below, to be expected behaviour. A number of us have come across this a few months back when trying to automate with Flow and the Graph.

General consensus seem to be provisioning ahead of time in SPO and then automating the rest. We are all waiting to bring this up at the next Teams AMA.

Hope that answers your question

Best, Chris
1: yes, expected behavior

2: with flow, create a file in the channel named so folder , not copy or other method! The folder will now be provisioned!
Copy content now
“Use SharePoint “create a file” action in the url for the channelfolder”

@adam deltinger @Christopher Hoard Thanks for this, forgive me if I'm being thick here, but those solutions look to be channel folder related? our issue is one step larger, in that the entire SPO site isn't provisioned (aka you get a 404 error) so with flow we wouldn't be able to make a file somewhere that doesn't exist? - I'm glad others are seeing this behavior though, out of interest is there a user-voice for this, or a date for the next AMA?





Ah okay! This never happened to me! The team site should be provisioned anyway and is not related to teams itself! Just the channel folders! How do you create the team?
Yeah, agree with Adam it could be how you are creating the team but it also sounds like a bug if it’s sporadic. Would consider raising this as a bug on Teams uservoice and raising a ticket to MS Support

I would be interested to see the outcome

The next AMA is still to be announced

Best, Chris