Forum Discussion
BoHyun
Nov 22, 2020Brass Contributor
Microsoft Graph Api - Create team Visibility : HiddenMembership error
Hi. I've been create a team using this code in c#, using Microsoft Graph Api. var additionalData = new Dictionary<string, object>() {
{
"template@odata.bind",
"https://g...
SteveDubois
Nov 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.
JElliott
Nov 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 🙂
- JElliottNov 24, 2020Brass Contributorthank you! I didn't think of trying that. I've also managed to create some Teams via powershell with educlass