0

With the msgraph-sdk-dotnet I create a unified group.

var newGroup = await graphClient.Groups.Request().AddAsync(new Group
{
    GroupTypes = new List<string> { "Unified" },
    DisplayName = name,
    Description = description,
    MailEnabled = true,
    SecurityEnabled = false,
    Visibility = "Private",
});

Next I want to add a Team to it. The docs provide me with the HTTP request to create a team (PUT /groups/{id}/team), but I would rather continue using the statically typed SDK.

What is the easiest way to use the SDK in order to create a Team?

halllo
  • 858
  • 12
  • 25

1 Answers1

2

You'll add a team like this:

graphClient.Groups[groupPage[8].Id].Team.Request().PutAsync(team)

This will be available in the next release. https://github.com/microsoftgraph/msgraph-sdk-dotnet/pull/352

Michael Mainer
  • 3,387
  • 1
  • 13
  • 32