Forum Discussion

Neil_Benson's avatar
Neil_Benson
Copper Contributor
Mar 21, 2020
Solved

How to automatically add a guest to a team in Teams?

Hello, I can add a guest to a Teams team using this procedure: https://support.office.com/en-us/article/add-guests-to-a-team-in-teams.

 

I'd like to automate this procedure so that when one of my students provides consent (in a web form registration page or email link trigger) that they are automatically added to my Teams team.

 

But I can't see a 'add a guest user account to a team in Teams' action in Power Automate or Zapier.

 

Has anyone successfully automated this procedure?

  • Thanks MattB365, but Microsoft has finally announced webinars for Teams. If it lives up to the hype, this is the answer I've been waiting for (rolling out May 2021).

11 Replies

  • Hi Niel,
    I am blocked too with the same problem. I created manually a guest in AZURE AD but can not gest the guest AAD Id of the guest. to be able to add him to Teams team I managed to create with Power Automate.
    Any idea ?

    Best regards
    Youcef
    • MarkTaylor's avatar
      MarkTaylor
      Copper Contributor

      Youcef_Doumandji

      1. I use the Office 365 "search for users (v2)" action to return 1 result (I have the private email address of the guest user (eg. hotmail/yahoo/outlook.com), but there are various filters)

      2. AAD 'get user' action (based on the previous hit, PA expands it to a for each because technically the search returns a collection/array of 1!)

      3. use get user result (to add them to the team.

       

       

      • Youcef_Doumandji's avatar
        Youcef_Doumandji
        Copper Contributor

        MarkTaylor 

        Mark,

        Thank you very much for your answer but  I think I did not explain my request correctely.

         

        In fact, I wish to create automatically a guest user in Azure AD from a change in a custum Dataverse entity. As for adding a contact as a guest in a Teams team I managed to do that.

         

        Very best regards.

         

        Youcef

  • MattB365's avatar
    MattB365
    Copper Contributor
    Hi Neil

    I know this thread is getting old, but I came upon it last week looking for the low-code answer to this question. Seems like there still isn't one....but then it dawned on me....Power Automate Desktop!
    • Neil_Benson's avatar
      Neil_Benson
      Copper Contributor
      Thanks MattB365, but Microsoft has finally announced webinars for Teams. If it lives up to the hype, this is the answer I've been waiting for (rolling out May 2021).
      • MattB365's avatar
        MattB365
        Copper Contributor
        Ah...OK, I see your use case now. Great. Fingers crossed that it solves your problem (and lives up to the hype!)
  • From a programmatic point of view, I'm pretty sure you can cover the scenario you have described here. I have not checked what Power Automate actions for Teams are available Today, but if adding Guest to Teams are not among then, you could do it by means for instance of an Azure Function that you could call from your Power Automate. The downside here are the licensing requirements
    • Neil_Benson's avatar
      Neil_Benson
      Copper Contributor

      jcgonzalezmartin. Thanks for the tip. I've been exploring Power Automate actions and while there is an action to create a user in Azure Active Directory, it is an organisation user and not a guest user. There doesn't seem to be an action for creating guest users in AAD that I could then add to a Teams team.

      Of course, creating an Azure Function is always an option. All I have to do is throw out Power Automate, forget about citizen development and hire a professional developer instead :0

Resources