Skip to main content

How to bulk add users to a Microsoft Teams team

Bulk add members to a Microsoft Teams team with PowerShell and a CSV of emails and roles, or with a no-code Power Automate flow and an Excel table.

Written by Brett Hellman

Adding members to a team in Microsoft Teams one by one can be time-consuming, especially if you’re working with a large group. Fortunately, there are several ways to add users in bulk, streamlining the process. Below, we’ll cover two popular methods: using PowerShell and Power Automate. This guide is from Matter, an employee recognition app for Microsoft Teams; the steps work for any team, whether or not you use Matter.

Who can use this: Team owners in Microsoft Teams, or a Microsoft 365 admin, on every Matter plan. Microsoft Teams only.

In addition to one-time bulk adding of users, here's how you can automate adding new users to a Teams team.

Method 1: Using PowerShell

If you’re an administrator, you can use PowerShell to add members to a team in bulk. Here’s how to do it:

Step 1: Install the Microsoft Teams PowerShell Module

First, ensure you have the Microsoft Teams PowerShell module installed. If not, install it by running the following command in PowerShell:

Install-Module MicrosoftTeams

Step 2: Connect to Microsoft Teams

Once the module is installed, connect to your Microsoft Teams environment:

Connect-MicrosoftTeams

Step 3: Prepare a CSV File

Create a CSV file with the users you want to add to the team. The file should have two columns:

  • Email: The email addresses of the users.

  • Role: Specify either "Owner" or "Member" for each user depending on the access you want to grant.

Example CSV format:

Email,Role
john.doe@example.com,Member
jane.smith@example.com,Owner

Step 4: Run the PowerShell Script

Use the following script to bulk-add users from the CSV file to your team:

# Import the list of users from the CSV file 
$TeamUsers = Import-Csv -Path "C:\Path\To\Your\TeamsUsers.csv"

# Add each user to the team
$TeamUsers | ForEach-Object {
Add-TeamUser -GroupId <YourTeamID> -User $_.Email -Role $_.Role
Write-host "Added User:" $_.Email -f Green
}

Make sure to replace <YourTeamID> with the actual GroupID of the team.

Method 2: Using Power Automate

Power Automate provides a no-code solution for those who are not comfortable with PowerShell. You can automate the process of adding users to a team by following these steps:

Step 1: Create an Excel File

Create an Excel file with a table that includes the list of email addresses you want to add to the team.

Step 2: Create a Flow in Power Automate

  1. Open Power Automate and create a new flow.

  2. Use the "List rows present in a table" action to pull the email addresses from your Excel file.

  3. Add the "Add member to a Team" action, and select the team you want to add members to.

  4. The flow will automatically repeat for each email in your Excel file, adding each person to the team.

Once your flow is set up, run it, and the users will be added to the team.

New to Matter? Matter adds kudos, birthday and work anniversary celebrations, and gift card rewards inside the Microsoft Teams channels your people already use, with a Free plan and a 14 day trial of everything. See Matter for Microsoft Teams or What is Matter?.

Did this answer your question?