bulk deleting multiple members from teams


how can I bulk deleting multiple members from teams
just like adding by Refined Microsoft Teams? # Heading

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
5,304 questions
No comments
{count} votes

Accepted answer
  1. Kael Yao-MSFT 21,611 Reputation points Microsoft Employee


    I suppose it can be done with Teams Powershell.

    You may need a csv file which contains the users' UPNs to be removed.

    The format would be like:
    user01@Company portal .com
    user02@Company portal .com
    user03@Company portal .com

    Then you may connect to Teams Powershell(install Teams module in Powershell and run Connect-MicrosoftTeams) as Team owner or Teams admin and run the following cmdlets.
    First get the groupID of the Team:

    Get-Team -DisplayName "Team Name"  

    Then remove members from the Team:

    import-csv 01.csv | foreach{Remove-Teamuser -GroupID <GroupID from the above cmdlet> -User $_.UserPrinciplename}  

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.

0 additional answers

Sort by: Most helpful