Showing results for 
Search instead for 
Did you mean: 
Advocate V
Advocate V

Using Graph API to add guest account to AAD and make it member of a Team

I use Graph API in Microsoft Flow. I create a guest account with Graph , this is successful. After that I add the created account to an existing Office 365 group which is a Team. This is also successful. I can see in AAD that the newly created guest account is a member of the O365 group.


But when I look in Microsoft Teams GUI the quest is NOT a member of the team. The guest HAS accepted the invitation to the TENANT. But an invitation for the TEAM is not sent using this way of adding a member to a Team and thus the guest cannot accept an invitation to the team. I don’t know if this is a condition for this to work but when you add a member using the GUI an invitation is sent.

The guest account is available in Teams so adding the guest manually is possible but we want to automate this.


I notice however that after several hours (9!) in the Teams GUI the added account is mentioned as  having joined the Team. So in de background something is hapening. The sad thing is that when this user starts Teams is says that he is not a member of any Team. The added guest account is granted a O365 F1 license.

Is there a way to speed things up?

Community Support
Community Support

Hi @BartSchaap ,


Could you share a screenshot of the flow?


It seems that you’ve created a custom connector in MS flow that works with MS Teams.


Could you share the run details of the flow as well?


By the way, do you mean that though Teams GUI added account show that the user has joined the Team, actually the user is not a member of the Team?


I will help reproduce this issue with more details.


Best regards,



Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


I did not make a custom connector. What I did (and what worked Smiley Happy) was:

I created an Azure AD app, this app has the rights to create users in ADD and add a user to an O365 group using Graph API, it needs Directory.ReadWrite.All and User.Invite.All and User.ReadWrite.all.

An Azure AD app had an Id and a secret. Using this info  in Flow I was able to create a user. NOTE: in this case it was a guest user, not a normal user! And I was able to add the created user to an already existing O365 group as a member. This is all succesfull. The thing is however that if this guest user logs and starts Teams GUI, he receive a message saying he is not a member of any Team. Even after several days he still gets this message, so my solution does not give the desired functionality while beeing technically correct Smiley Sad

Hi @BartSchaap ,


Are you using Flow to create and add a guest user to a Teams group?


Please check the Group under Teams to see if the guest user really exists.


Further, I have searched reference docs on Microsoft Teams guest user for your reference:


Best regards,



Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey @BartSchaap 


I know I'm replying to an old message, but your "Azure AD app" sounds like just what I need!  I don't suppose you could post some source/ screenshots here could you?  It's crazy that AD guest account creation isn't baked in already!  

Thanks a ton! 

-- Jon

@SharepointJon (Twitter)


Helpful resources

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (7,909)