Hi @Cierlik Marcin, DIGITAL, SEARGIN
I can reproduce your question, please remove the Template
object in the code.
var graphTeam = new Team()
{
DisplayName = group.DisplayName,
Description = group.Description,
MemberSettings = new TeamMemberSettings
{
AllowCreatePrivateChannels = true,
AllowCreateUpdateChannels = true,
},
MessagingSettings = new TeamMessagingSettings
{
AllowUserEditMessages = true,
AllowUserDeleteMessages = true,
},
FunSettings = new TeamFunSettings
{
AllowGiphy = true,
GiphyContentRating = GiphyRatingType.Strict,
},
GuestSettings = new TeamGuestSettings()
{
AllowDeleteChannels = false,
AllowCreateUpdateChannels = false
}
};
await _graphClient.Groups["289a7d04-e247-4c24-ab25-edf8818752e1"].Team.Request().PutAsync(graphTeam);
Or change your snippet to:
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Team
{
AdditionalData = new Dictionary<string, object>
{
{
"template@odata.bind" , "https://graph.microsoft.com/v1.0/teamsTemplates('standard')"
},
{
"group@odata.bind" , "https://graph.microsoft.com/v1.0/groups('71392b2f-1765-406e-86af-5907d9bdb2ab')"
},
},
};
var result = await graphClient.Teams.PostAsync(requestBody);
Please refer to the example here.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.