I am trying without results to create a team in a educational tenant with educationClass template, dinamically with Microsoft Graph SDK for C#. This is the code with the BETA api that is recommended from the official website (https://docs.microsoft.com/es-es/graph/api/team-post?view=graph-rest-beta&tabs=csharp).
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var team = new Team
{
DisplayName = "My Sample Team",
Description = "My Sample Team’s Description",
AdditionalData = new Dictionary<string, object>()
{
{"template@odata.bind", "https://graph.microsoft.com/beta/teamsTemplates('educationClass')"},
{"owners@odata.bind", "[\"https://graph.microsoft.com/beta/users('userId')\"]"}
}
};
await graphClient.Teams
.Request()
.AddAsync(team);
When I execute this code it throws the following error: Microsoft.Graph.ServiceException: 'Code: BadRequest Message: Invalid URL format specified in @odata.bind for owners
Thank you!