1

I'm creating a team from a office 365 group using the c# sdk as specified in the documentation.

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var team = new Team
{
    MemberSettings = new TeamMemberSettings
    {
        AllowCreateUpdateChannels = true
    },
    MessagingSettings = new TeamMessagingSettings
    {
        AllowUserEditMessages = true,
        AllowUserDeleteMessages = true
    },
    FunSettings = new TeamFunSettings
    {
        AllowGiphy = true,
        GiphyContentRating = GiphyRatingType.Strict
    }
};

await graphClient.Groups["{id}"].Team
    .Request()
    .PutAsync(team);

This works to create the team and also adds the members and owners of the group automatically to the team, but it doesn't add guests from the group to the team.

Is this a known issue and is there a workaround for this problem?

Marijan Brezovic
  • 111
  • 1
  • 1
  • 5
  • Adding guest user is a two step process. First step is to send invitation for which you can use [Invitation Graph API](https://learn.microsoft.com/en-us/graph/api/invitation-post?view=graph-rest-1.0&tabs=http). And once user is invited to your AD you can add him/her using [Add Members Graph AP](https://learn.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http). – Trinetra-MSFT Aug 19 '19 at 05:53
  • @Trinetra-MSFT Why not add this as an answer? – Darrel Miller Aug 28 '19 at 17:57

1 Answers1

0

Adding guest user is a two step process. First step is to send invitation for which you can use Invitation Graph API. And once user is invited to your AD you can add him/her using Add Members Graph API.

Trinetra-MSFT
  • 957
  • 5
  • 9
  • But the user is already a guest in the group i am creating a team for, if it populates the members and owners of that group as the team owners and members, shouldn't it automatically add the guests that are present in the group to the team as well? – Marijan Brezovic Aug 30 '19 at 11:15