[urgent] Add bulk external users via powershell to Microsoft Teams

sweetu ve 281 Reputation points
2020-11-24T06:22:20.617+00:00

Adding bulk external users to teams and check if they already exist in the team for the specific group and need help in implementing using powershell

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,628 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,065 questions
{count} votes

Accepted answer
  1. Trinetra-MSFT 111 Reputation points
    2020-11-27T06:34:38.173+00:00

    AFAIK, This is possible through the Graph API.
    To bulk add users to your team, the most recommended way is to create an office365 group or distribution list by your admin. Once you have those members in it, at teams client, instead of adding individual members, you add to as group, so you could achieve adding multiple users at the same time.

    If you need to using PowerShell command to add team users, you could refer to https://learn.microsoft.com/en-us/powershell/module/teams/add-teamuser?view=teams-ps.

    For importing the csv file to create a new dg, we need to use a PowerShell command as below:

    Import-Csv “D:\list.csv” | foreach{Add-DistributionGroupMember -Identity “GroupName” -Member $_.alias}

    Please replace “GroupName” with your actual distribution group email address.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. JimmyYang-MSFT 50,446 Reputation points Microsoft Vendor
    2020-11-24T09:25:51.26+00:00

    Hi @sweetu ve ,

    You need to invite the external user first. You can do it via the Azure AD module.

    For more reference:

    https://learn.microsoft.com/en-us/azure/active-directory/external-identities/b2b-quickstart-invite-powershell


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.