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 :)
I was able to resolve this problem with the help of Microsoft Support. I had this same issue, where we already had an external user that has a lot of access to SharePoint resources, and I was trying to add them to a Distribution List. This user was in the list of Guest Users, and I could not add them to the Contacts list because of the same email address.
Microsoft support reps were able to instruct me how to run some PowerShell scripts that manually added the guest user to the distribution list. I do not have the exact scripts I ran, sorry for that, but just know that this can be done without having to remove the Guest account, and without having to have them added as a Contact first. However, after encountering this, I will be trying to add new external team members as Contacts first, to avoid having to do this again.
- J_Weikert-1995Jan 18, 2019Copper Contributor
You have to get Access to Office 365 Exchange
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $SessionAnd this is the command to add the Guest User to the list
Add-DistributionGroupMember -identity [GroupName] -Member [UserMailAdress]
- TonyRedmondJan 18, 2019MVP
The important thing is to add the same email address used for the guest account to the distribution list. This example is from Chapter 12 of the Office 365 for IT Pros eBook. Azure AD is looked up to retrieve the address to make sure that we use the right one:
Add-DistributionGroupMember -Identity DL1 -Member (Get-AzureADUser -ObjectId stale.hansen_cloudway.no#EXT#@office365itpros.onmicrosoft.com).Mail