Nov 22 2020 10:24 PM - edited Nov 22 2020 10:28 PM
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://graph.microsoft.com/beta/teamsTemplates('educationClass')"
}, {
"owners@odata.bind",
new List<string>()
}
};
(additionalData["owners@odata.bind"] as List < string >).Add("https://graph.microsoft.com/v1.0/users/" + ownId);
var team = new Team {
DisplayName = displayName,
Description = description,
AdditionalData = additionalData
};
await graphClient
.Teams
.Request()
.AddAsync(team);
But there was an error all of a sudden today. As follows
Team Definition. Visibility' should be equal to 'HiddenMembership'
So I set the Visibility option.
Visibility = TeamVisibilityType.HiddenMembership
But error occured like this..
Team Visibility must be one of known types: [Private,Public,HiddenMembership]
There is also no information on 'HiddenMemberhip' in this document.
The Visual studio nuget manager also upgraded to the latest beta version.
License is Education A1.
Nov 23 2020 08:08 AM
Nov 23 2020 01:25 PM - edited Nov 23 2020 02:03 PM
@Maxime Pelletier @BoHyun Same issue here! Everything was working just a few days ago.
I get the same also by using Graph Explorer.
Nov 23 2020 11:46 PM
Nov 24 2020 02:44 AM
Nov 24 2020 03:13 AM
Nov 24 2020 03:38 AM
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.
Nov 24 2020 04:13 AM
@JElliott
But can you add a class notebook to a team that wasn't created with an educationClass template?
Nov 24 2020 04:39 AM - edited Nov 24 2020 04:47 AM
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.
Nov 24 2020 05:05 AM
Nov 24 2020 05:11 AM
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 :)
Nov 24 2020 05:25 AM
Nov 24 2020 02:08 PM
@BoHyun @JElliott @Sjoerd1185 @SteveDubois @Matt-Hurford @Maxime Pelletier Good news: now everything works again as a few days ago!! I just noticed that the issue "TM2274400" was closed by Microsoft. I tried again using my PowerShell + Graph code for creating EducationClass teams: it works!
Nov 25 2020 06:02 AM - edited Nov 25 2020 06:06 AM
Hi. @BoHyun
Try with the v1.0 and make the request in the following way:
{
"template@odata.bind":"https://graph.microsoft.com/v1.0/teamsTemplates('educationClass')",
"displayName":"My Sample Team",
"description":"My Sample Team’s Description",
"members":[
{
"@odata.type":"#microsoft.graph.aadUserConversationMember",
"roles":[ "owner" ],
"user@odata.bind":"https://graph.microsoft.com/v1.0/users('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')"
}
]
}