Forum Discussion
How do I add a guest mail user to adress lists or create a mail contact using the same email address
- Dec 07, 2017
To be honest, it's a bit of a mess as you can actually have the same address added twice:
[10:36:59][Login script]# Get-Recipient tempxxx@abv.bg | Ft Name,RecipientType* Name RecipientType RecipientTypeDetails ---- ------------- -------------------- temp MailContact MailContact tempxxx_abv.bg#EXT# MailUser GuestMailUser
The "trick" is to have the contact first, then provision the Guest account. Doesn't really make much sense to me, but TonyRedmond seems to see the logic in all this and perhaps can explain it better :)
Guest Users are already in exchange as a mailuser. You cannot add them from the GUI, at least not the legacy (I personally dislike the new exchange interface, and they change the UI so fast … just forget it and use PowerShell so you don't look silly to clients fumbling around to find something M$ decided to move for no reason).
From PowerShell you can do the following:
# list your mailusers
get-mailuser | Sort-Object -Property name
# add your mailuser to a distro group
$user = get-mailuser | where name -eq 'joe.blow_domain.com#EXT#'
$group = Get-DistributionGroup 'testsecuritydistributiongroup'
Add-DistributionGroupMember -Identity $group.Identity -Member $user.UserPrincipalName
Done.
squirrelassassin650 When I create a guest user via invitation, and I perform Get-MailUser, it is NOT in the list. Even if I change using Set-AzureADUser the flag to show it ???
- squirrelassassin650Mar 12, 2021Copper ContributorDid the guest user accept the invitation yet? Under contact in azure ad is the email set? Does the proxyaddress area show both their actual email & your tenant routing domain?
- ChrisAtMafMay 28, 2021Iron ContributorGuest mail users can be managed for distribution group memberships using the new Exchange Admin Center without any issues: https://admin.exchange.microsoft.com/#/
- Aadil TeeluckdharryJan 11, 2022Copper ContributorI found the easier way for me 🙂 Since the users are already guest on my tenant, I used powershell to show them in address book and then uses either the portal to add them to the distribution group or uses powershell.
Powershell to unhide email address : Set-AzureADUser -ObjectId ID_OF_USER -ShowInAddressList $true
Powershell to add user in distribution list : Add-DistributionGroupMember -Identity GROUPNAME -Member (Get-AzureADUser -ObjectId ID_OF_USER).Mail
Hope that it helps.