When creating multiple channels within a newly created team (Folders are not created in SharePoint)

%3CLINGO-SUB%20id%3D%22lingo-sub-1195567%22%20slang%3D%22en-US%22%3EWhen%20creating%20multiple%20channels%20within%20a%20newly%20created%20team%20(Folders%20are%20not%20created%20in%20SharePoint)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1195567%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20working%20on%20some%20automation%20with%20the%20Microsoft%20Teams%20PowerShell%20module.%20But%20after%20creating%20a%20new%20Microsoft%20Team%20and%20directly%20create%20some%20channels%20the%20folders%20are%20not%20created.%20As%20attachment%20the%20PowerShell%20script%20and%20.csv%20(import%20file)%20i%20use%20to%20automate%20this%20proces.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20attachment%20i%20upload%20the%20scripts%20i%20use%20in%20this%20scenario.%20I%20also%20raised%20a%20support%20ticket%20within%20the%20admin%20center.%20But%20they%20don't%20deliver%20support%20on%20PowerShell%20scripts%20and%20re-routed%20me%20to%20the%20Premium%20support.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1195567%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1196510%22%20slang%3D%22en-US%22%3ERe%3A%20When%20creating%20multiple%20channels%20within%20a%20newly%20created%20team%20(Folders%20are%20not%20created%20in%20SharePoi%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1196510%22%20slang%3D%22en-US%22%3E%3CP%3ESince%20Teams%20provisions%20multiple%20resources%20across%20different%20workloads%2C%20the%20process%20can%20take%20a%20while%20(even%20up%20to%2024h)%20to%20complete.%20If%20you%20want%20to%20provision%20folders%2Ffiles%20immediately%2C%20use%20the%20corresponding%20SPO%20tools%20(CSOM%20or%20the%20Graph%20API%20endpoints).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1198159%22%20slang%3D%22en-US%22%3ERe%3A%20When%20creating%20multiple%20channels%20within%20a%20newly%20created%20team%20(Folders%20are%20not%20created%20in%20SharePoi%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1198159%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3Byou're%20right%20that%20provision%20of%20teams%20sometimes%20can%20take%20up%20to%2024%20hours%2C%20but%20after%20running%20the%20command%20%22New-TeamChannel%22%20a%20folder%20should%20be%20created%20directly%20in%20SharePoint%20Online.%20In%20this%20case%20i%20created%20a%20script%20(see%20attachment)%20with%20and%20iteration%20to%20create%20multiple%20channels%20with%20different%20names.%20Folders%20are%20not%20created%20in%20SharePoint%20Online%2C%20if%20i%20run%20this%20command%20directly%20in%20PowerShell%20the%20specific%20folder%20is%20created%20directly.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt's%20possible%20to%20reproduce%20this%20issue%20with%20the%20following%20two%20commands%20(first%20wait%20until%20the%20first%20command%20is%20finished)%20and%20then%20run%20the%20second%20one%3C%2FP%3E%3CP%3E%24team%20%3D%20New-Team%20-DisplayName%20%22TestTechCommunity%22%3C%2FP%3E%3CP%3ENew-TeamChannel%20-GroupId%20%24team.groupId%20-Displayname%20%22test%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20this%20scenario%20the%20channel%20is%20visible%20in%20teams%20but%20if%20you%20look%20in%20SharePoint%2C%20no%20folder%20is%20created.%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22metadata%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E
New Contributor

I'm working on some automation with the Microsoft Teams PowerShell module. But after creating a new Microsoft Team and directly create some channels the folders are not created. As attachment the PowerShell script and .csv (import file) i use to automate this proces.

 

As attachment i upload the scripts i use in this scenario. I also raised a support ticket within the admin center. But they don't deliver support on PowerShell scripts and re-routed me to the Premium support. 

2 Replies

Since Teams provisions multiple resources across different workloads, the process can take a while (even up to 24h) to complete. If you want to provision folders/files immediately, use the corresponding SPO tools (CSOM or the Graph API endpoints).

@Vasil Michev you're right that provision of teams sometimes can take up to 24 hours, but after running the command "New-TeamChannel" a folder should be created directly in SharePoint Online. In this case i created a script (see attachment) with and iteration to create multiple channels with different names. Folders are not created in SharePoint Online, if i run this command directly in PowerShell the specific folder is created directly. 

 

It's possible to reproduce this issue with the following two commands (first wait until the first command is finished) and then run the second one

$team = New-Team -DisplayName "TestTechCommunity"

New-TeamChannel -GroupId $team.groupId -Displayname "test"

 

In this scenario the channel is visible in teams but if you look in SharePoint, no folder is created.