Microsoft Graph invited guest members are not present in a team

Susac, Karlo 21 Reputation points
2023-01-16T10:30:55.82+00:00

We're doing a Micorosft Teams integration to our application, basically, we want to have a controller which is passed a list of emails to create a group and a team, and if any of those emails are not present in the organization AAD we would send out invitations to those users to be guests.

So we're filtering users and checking which of those are guests and then sending invitations to those, after that we have a short delay to make sure that all of the invited guests have been added so we can fetch their ids to add them in a group and a team.

After that step we're creating a team with all of the users and that usually works fine. We're using https://graph.microsoft.com/v1.0/groups/{group-id}/members to make sure that the users have been added.

And then we're creating the team using the group with this request: [https://learn.microsoft.com/en-us/graph/api/team-put-teams?view=graph-rest-1.0&tabs=http

Sadly this is where the issue occurs, most of the times group and team members are not synced. List group members request is returning this:

This is how our request looks like:
User's image

I have 1 guest user that I want to add and 1 owner.

User's image

While List team members is returning this:

User's image

So the group is saying that we have 1 member, which is correct but the team is saying that only owner is present.
This state is also reflected in the Teams application.
User's image

Sometimes the request works fine and guest members are present but most of the times that is not the case. I have tried using wait to see if this would negate the issue but it seems like it's always the same.

Can anyone please help or explain if we're doing anything wrong? Also to mention this is only happening with the guest users.

Microsoft Graph Groups API
Microsoft Graph Groups API
A Microsoft API that creates and manages different types of groups and group functionality.
175 questions
No comments
{count} votes

Accepted answer
  1. HarmeetSingh-MSFT 3,171 Reputation points Microsoft Employee
    2023-01-16T12:01:18.5533333+00:00

    Hello @Susac, Karlo

    Thank you for posting!

    I'm unable to replicate this issue behavior. I can see my guest member in Teams UI as well as in Graph API response. Since this could be a tenant-specific issue, so I would recommend you raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from http://aad.portal.azure.com/ or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    No comments

0 additional answers

Sort by: Most helpful