Hi @RUQAIA MOHAMMED MALIK AL RAJHI
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:
UserPrincipleName
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.