SOLVED

How do I add a guest mail user to adress lists or create a mail contact using the same email address

Brass Contributor

Hello,

 

I'm trying to create a mail contact for an external user so we can add the user to an address list. Unfortunately, I can't create the contact because the primary smtp address is taken by a guest mail user. The guest mail user has access to our SharePoint site.

 

1. How do I add a guest mail user to an address list?

2. If I delete a guest mail user will the person lose access to SharePoint?

3. If a user has a mail contact in Exchange Online, can the user still receive and accept access to our SharePoint site?

 

Capture.JPG

31 Replies

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.

 

@John Gruber 

@LennyK_108 This worked and is soooo much easier than anything else I've read, thanks!!!!

 

@LennyK_108  @malfaro It is also possible to add 'Guest Mail Users' to Distribution Groups via a web browser without using PowerShell. Go to the Microsoft 365 Admin Portal - find the Guest Mail User under Users/Guest Users, select them, and click 'Manage groups' on the left hand side.

 

It takes a while for the group list to be updated in that console, but the changes are visible in the Exchange Admin Centre immediately.

 

https://admin.microsoft.com/AdminPortal/Home#/GuestUsers

 

Thanks @ChrisAtMaf 

Your solution worked beautifully for me.

 

@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 ???

Did 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?
Guest mail users can be managed for distribution group memberships using the new Exchange Admin Center without any issues: https://admin.exchange.microsoft.com/#/
I 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.


If an organization has Exchange Hybrid (ironically they have no plan to move out of this scenario in the near future), has created contacts and added them to DLs. They require the use of the contacts and DLs on premise for the forseeable future. They have configured AD Connect to synch those contacts and DLs into Azure AD. This has caused an issue when they now wish to create Azure B2B guest users since the contact and guest user proxy address conflicts. I have recommended that they moved those contacts to a separate OU and not synch them to Azure AD to resolve the issue with creating guest users, make those guest users unhidden, and add them to DLs. Does this approach make sense? Any other solution that comes to mind?
Say that many guest users exist in Azure AD. To make them unhidden from the GAL in bulk, will the following PowerShell do the trick:

Get-AzureADUser -Filter "userType eq 'Guest'" | Set-AzureADUser -ShowinAddressList $true
This was the way to go for us, easy. One thing though, I had to include the additional values if the user didn't already have them, seems they are required.

Set-AzureADUser -ObjectId cfcbd1a0-ed18-4210-9b9d-cf0ba93cf6b2 -ShowInAddressList $true -GivenName 'Megan' -Surname 'Bowen' -DisplayName 'Megan Bowen' -TelephoneNumber '555-555-5555'

For details, see "Add guests to the global address list" in the Microsoft 365 per-group guest access article. https://docs.microsoft.com/en-us/microsoft-365/solutions/per-group-guest-access

@Elham Karshenas   Set-MailUser -Identity "guestuseemailaddress" -HiddenFromAddressListsEnabled $false  command will help to show the guest mail user in GAL.