This is how to invite external users to work with you in Teams using Guest accounts. Whilst you can use federation in Teams to chat 1-1 with external users, it’s impossible to add an external user to a Team without using Guest accounts.
The process below uses PowerShell to invite guests without sending an invitation email — the invitation is automatically accepted when they click on a link.
Create a CSV file guestusers.csv:
"DisplayName","UserPrincipalName"
"Jo User","jouser@company.com"
Run the following script:
# Invites Guest users without sending an email invite
$CSVfile = "$PSScriptRoot\guestusers.csv"
Write-Host "Connecting to AzureAD"
Connect-AzureAD
$users = Import-Csv $CSVfile
foreach ($user in $users) {
$UPN = $user.UserPrincipalName
$DisplayName = $user.DisplayName
if (Get-AzureADuser | Where-Object {($_.DisplayName -eq $DisplayName) -and ($_.UserType -eq 'Guest')}) {
Write-Host "Error: $DisplayName Guest already exists" -ForegroundColor Red
Exit
} else {
Write-Host "Inviting $UPN"
New-AzureADMSInvitation -InvitedUserDisplayName $user.DisplayName -InvitedUserEmailAddress $user.UserPrincipalName -InviteRedirectURL https://myapps.azure.com -SendInvitationMessage $false
}
}
Internal users can access the folder via Teams. You can also send the SharePoint site link if they don’t have Teams installed.