How to Add Bulk Users to Microsoft Teams 

How to Add Bulk Users to Microsoft Teams

Recently I came across multiple technical forums with the same question “How to add bulk members to teams through PowerShell?”. I thought I’d help with this by writing a script. Managing Microsoft Teams using PowerShell is a simple and effective way. So, Let’s dive in.

How to Add Bulk Users to Teams Group using PowerShell:

The PowerShell cmdlet Add-TeamUser adds a member to the team. But you can’t use it directly for adding members in bulk. So, you need a few lines of PS code to make it work. To use Teams PowerShell cmdlets, you must install Microsoft Teams PowerShell module.

To bulk import users from CSV file, you can use the following PowerShell script.

Connect-MicrosoftTeams 
Import-CSV <FilePath> | foreach {   
$UPN=$_.UPN   
Write-Progress -Activity "Adding $UPN to teams..."   
Add-TeamUser –GroupId <TeamId> -User $UPN   
If($?)   
{   
 Write-Host $UPN Successfully added -ForegroundColor Green   
}   
Else   
{   
 Write-Host $UPN - Error occurred –ForegroundColor Red   
}   
} 

In the above script, you can replace the following.

<FilePath> –>CSV file path
<Team Id> –> Team group id (To view Team id, you can use the Get-Team cmdlet.)

The input CSV file should follow the format below.

Add bulk users to Microsoft Teams csv import

The script execution looks similar to the below screenshot.

Add bulk users to teams

Additional Use cases:

  • You can also use the above code to add bulk guest and external users to teams by importing external users through input CSV.
  • If you want to add owners to the team, you can use the same code, additionally with the –Role parameter in the Add-TeamUser cmdlet. For example,
Add-TeamUser –GroupId <TeamId> -User $UPN –Role Owner 
  • Adding users to teams automatically adds users to teams’ channels. But it will not add users to private channels.

How to View Teams Members and Owners Report:

Admins can view all the teams and their members through the Team admin center. Viewing via the Teams admin center is suitable only for small organizations. For large organizations, PowerShell is the only solution.

To make it simple, you can use the pre-built script to generate 8+ Microsoft Teams reports including all teams report, all teams members & owners report, channels report, etc.

Microsoft Teams Reporting

Though PowerShell is a reliable solution for reporting in large enterprises, admins need to play hard with multiple scripts and cmdlets to retrieve the desired Teams information. It kills your time, especially during any investigation or when you are urged to dig through your organization’s Teams activity. Here comes AdminDroid🎯 like a savior. Let’s dive into it in detail.

How AdminDroid Steps Up Your Teams Reporting Experience?

AdminDroid improves your Microsoft Teams management by optimizing your time and providing in-depth details about Teams without requiring you to rely on PS scripts. It gives reports on team types, Teams memberships & ownerships, Teams channels stats, private channel details, Teams settings, and more with AI-generated charts📊 for valuable insights. The Teams dashboard serves you a bird’s eye view of your Microsoft Teams environment. Undoubtedly, the AdminDroid Microsoft Teams reporting tool is a savior for admins.

In addition, it provides plentiful reports on Teams audit activities which clears the mess around the Microsoft 365 audit log. It provides 30+ reports on team creation, deletion, member addition, ownership removals, channel creation, deletion, modification, and more in your organization. AdminDroid Microsoft Teams auditing tool helps to overcome the struggles of native auditing tools with its breathtaking features.

Level up your Teams management today and stay ahead of everything that happens in your Teams environment. Start exploring AdminDroid today and fly high🚀 in managing your Microsoft 365 kingdom.

I hope this blog will help in managing Microsoft Teams efficiently and effortlessly. Happy scripting!

How to Add Bulk Users to Microsoft Teams 

by Kathy time to read: 2 min
0