Forum Discussion
MariusPretorius
Nov 25, 2020Iron Contributor
Teams Admin: Creating Bulk Class Teams using PowerShell and a CSV file
For Your Information: I have successfully created Class Teams using PowerShell and a CSV file. This is very handy because you can have a whole list of teams, channels, teachers and students in a CSV ...
Nikos_M
Aug 22, 2021Copper Contributor
Hi,
thank you for your excellent script
Unforunatelly i am getting the following error
Spoiler
New-Team : Error occurred while executing Code: BadRequest Message: Failed to execute Templates backend request CreateTeamFromTemplateRequest. Request Url: https://teams.microsoft.com/fabric/emea/templates/api/team, Request Method: POST, Response Status Code: BadRequest, Response Headers: Strict-Transport-Security: max-age=2592000 x-operationid: e33aa8f7bcaaf2409469a733f43c4d56 x-telemetryid: 00-e33aa8f7bcaaf2409469a733f43c4d56-2d04028de3c0164f-00 X-MSEdge-Ref: Ref A: 78BB7E144EAC4317B3AC67C206C16AB8 Ref B: LON21EDGE1113 Ref C: 2021-08-22T15:51:03Z Date: Sun, 22 Aug 2021 15:51:02 GMT , ErrorMessage : {"errors":[{"message":"Team Visibility must be one of known types: [Private,Public,HiddenMembership].","errorCode":"Unknown"}],"operationId":"e33aa8f7bcaaf2409469a733f43c4d56"} InnerError: RequestId: 415e5729-033a-4532-b76c-0524e12c9ddd DateTimeStamp: 2021-08-22T15:51:03 HttpStatusCode: BadRequest At C:\365\classes\CreateMsTeamsComprehensive.psm1:104 char:30 + ... $group = New-Team -MailNickName $team.TeamsName -displayname $tea ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : SyntaxError: (Microsoft.Teams...Cmdlets.NewTeam:NewTeam) [New-Team], ApiException + FullyQualifiedErrorId : Team creation failed.,Microsoft.Teams.PowerShell.TeamsCmdlets.NewTeam
cedriczeiter
Aug 24, 2021Copper Contributor
Nikos_M Did you find any solution to the issue? I ran into the same error-message.
Seems like we have to add a Team-Visibility Column to the CSV file.