Adding external users to Teams using Graph API or Powershell

Justin Chou 46 Reputation points
2020-08-25T09:17:56.563+00:00

Is there a way to add external guests to teams using Graph API or Powershell?
I have used this to add people.
https://learn.microsoft.com/en-us/powershell/module/teams/add-teamuser?view=teams-ps
But it turns out that it only works if the email used already exists in the directory as I added my test email manually through the Teams App.

Microsoft Teams Microsoft Teams for business Other
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2020-08-25T09:37:34.74+00:00

    You need to invite them first, you can do so via the Azure AD (preview) module: https://learn.microsoft.com/en-us/azure/active-directory/external-identities/b2b-quickstart-invite-powershell
    Or the corresponding Graph API endpoint.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. JimmyYang-MSFT 58,641 Reputation points Microsoft External Staff
    2020-08-26T03:00:53.587+00:00

    Hi!

    As a supplement, you can also invite guest users in bulk with Azure Active Direcotry B2B collaboration. You need two or more test email accounts that you can send the invitations to. For more details, please refer to:

    https://learn.microsoft.com/en-us/azure/active-directory/external-identities/tutorial-bulk-invite#invite-guest-users-in-bulk

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.