While the documentation explains how to create a team with a team template by using raw HTTP requests, I couldn't find a out-of-the-box solution by using the Graph SDK.
The best match I could find was:
serviceClient.Teams.Request().AddAsync(new Team { Template = new TeamsTemplate { Id = "???", ODataType = "???" } });
But insert the template names like standard
or educationClass
didn't work on any place in the above given request. So any documentation available about how to form the request by using the SDK?
I'm using this request to create a team with a template:
await client.Teams.Request().AddAsync(
new Team
{
DisplayName = "My team",
Description = "desc",
AdditionalData = new Dictionary<string, object>()
{
{"template@odata.bind", "https://graph.microsoft.com/v1.0/teamsTemplates('standard')"}
}
});
Check this thread for a workaround if your way doesn't work.