Forum Discussion
Microsoft Graph Api - Create team Visibility : HiddenMembership error
Before this problem, I hadn't realised you could create a templated team from an existing group. I haven't tried yet, but hope it works as have a lot of people waiting on Teams being created from a recent change in timetables. my only worry is i know that the educationClass template with Teams usually applies a number of settings on the underlying created 365 group, like not sending out the email for users joining, etc.
- Matt-HurfordNov 24, 2020Copper Contributor
JElliott
But can you add a class notebook to a team that wasn't created with an educationClass template? - SteveDuboisNov 24, 2020Copper Contributor
Seems to be a reasonable temporary solution.
Can you keep us updated about the outcomes of your tests?
Would be very apreciated.
I will do the same if I find the time to test it myself.
- JElliottNov 24, 2020Brass Contributor
I created a group with matching settings (HiddenMembership, autosubscribe, etc) and then tried to create a Team using that group and the educationClass template, no joy =(
POST:
{ "template@odata.bind":"https://graph.microsoft.com/beta/teamsTemplates('educationClass')", "group@odata.bind":"https://graph.microsoft.com/v1.0/groups('groupid')" }Response:
{ "error": { "code": "BadRequest", "message": "Failed to execute Templates backend request CreateTeamFromGroupWithTemplateRequest. Request Url: https://teams.microsoft.com/fabric/emea/templates/api/groups/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/team, Request Method: PUT, Response Status Code: BadRequest, Response Headers: Strict-Transport-Security: max-age=2592000\r\nx-operationid: xxxxxxxxxxxx\r\nx-telemetryid: 00-xxxxxxxxxxxx-xxxxxxxxxxxx-00\r\nX-MSEdge-Ref: Ref A: xxxxxxxxxxxx Ref B: DB3EDGE1609 Ref C: 2020-11-24T12:29:42Z\r\nDate: Tue, 24 Nov 2020 12:29:42 GMT\r\n, ErrorMessage : {\"errors\":[{\"message\":\"Team Visibility can not be specified as it is inherited from the group.\"}],\"operationId\":\"xxxxxxxxxxxx\"}", "innerError": { "date": "2020-11-24T12:29:42", "request-id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "client-request-id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } } }Team Visibility can not be specified as it is inherited from the group.
So, even though I'm not specifying visibility in the creation request, it's picking up HiddenMembership from the pre-created group and somehow it's interfering with the template. Well and truly messed up it seems.
I haven't tried creating a class from just Teams (without using Graph) but I wonder if it's having the same issues.
I hope that the solution here isn't to create a class through the /education endpoint that then gets a team created for it by the teacher.
quick edit: I also tested this on the v1.0 graph API with the same errors. so, this is not just a "beta" issue, it's affecting production endpoints as well.
- Sjoerd1185Nov 24, 2020Copper Contributor
I can still create Education Teams with Teams Powershell-Module. I've tried to find the type of requist the Module is sending with fiddler, but I can't figure it out yet 🙂