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 Sam Lepak

To bulk add users to a Microsoft Teams team, a team owner or Microsoft 365 admin can import a CSV of email addresses with PowerShell (Connect-MicrosoftTeams, Import-Csv, then Add-TeamUser), or build a Power Automate flow that adds each person in a list. Both work for any team, with or without Matter. This guide is from Matter, an employee recognition app for Microsoft Teams.

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

For an overview of the whole feature, read the Matter setup and rollout guide for Microsoft Teams.

To add new users automatically instead of in one bulk import, see Automatically add users to Matter in Microsoft Teams.

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?