Create a CSV file with the following columns.
User Powershell to import CSV file using Teams module.
Install-Module -Name MicrosoftTeams -Force
Connect-MicrosoftTeams
$users = import-csv "C:\path\to\csv\teams.csv"
Foreach($user in $users)
{
Add-TeamUser -GroupId $user.GroupID -User $user.User -Role $user.Role
}