Hello Readers. Hope you’re well.
Another quick post.
Microsoft has enabled external Guest access in Teams. And I know you’ve all been frantically adding guests to your teams.
I’m a guest in a couple of teams of like-minded individuals. One of the biggest complaints is the display name. When you add a guest to a team in Teams, the display name is the alias of the User Principal Name (UPN) by default.
I explain in a previous blog post that it is possible to specify the display name before the invite goes out. In this post I’ll go through the ways you can change the display name of your guests after the invite goes out and they’ve already accessed your team.
There are two ways to do this. I’ll start with the quickest and easiest. PowerShell.
Change the display name of a guest using PowerShell
Get-MsolUser -SearchString “randy.chapman”
Set-MsolUser -UserPrincipalName first.last_guestdomain.com#EXT#@yourdomain.com -DisplayName “First Last (Company)”
You also have a some more options here to make it a little easier.
$guest = Get-MsolUser -SearchString “randy.chapman” | select -expandproperty UserPrincipalName
Then you can insert the variable to make the change.
Set-MsolUser -UserPrincipalName $guest -DisplayName “Randy Changed”
Now if you look up the user you changed, you’ll see the new display name is shown.
In addition to the Display Name, you can also set loads of other parameters such as FirstName, LastName, Title, PhoneNumber and various address fields. All good, but your users won’t see that info in Teams anyway.
Remove or disable a guest in PowerShell
You can also use PowerShell to remove a guest or disable them without removing them.
To remove, enter:
Remove-MsolUser -UserPrincipalName first.last_guestdomain.com#EXT#@yourdomain.com
To disable without removing, enter:
Set-MsolUser –UserPrincipalName first.last_guestdomain.com#EXT#@yourdomain.com -BlockCredential $True
This is the PowerShell Equivalent of the Block Sign In, in the Azure AD admin portal.
As I said at the beginning of the post, there is another way to do this and that is in the Azure AD admin portal.
Change the display name of a guest in the Azure AD Admin portal
Some important notes
I hope you found this useful. Thank you for reading.
If this or any other post has been useful to you please take a moment to share. Comments are welcome.