SOLVED

Adding to Distribution List

Iron Contributor

I am not sure if this should be here or in Exchange.

 

We have a Distribution List where some members have email accounts in our O365 tenant and some members are outsiders. For outsiders we normally add them to Contacts and can then add them to the Distribution List. 

 

We have a user in our tenant who does not have a mailbox. He uses his personal email address. When we try to add him to Contacts we get the message that "There are multiple recipients matching identity "XXX XXXXX". Please specify a unique value."

 

I suppose I could add him as "XXXY XXXXX" but I assume there must be a better way to do this.

12 Replies
Whenever you are referencing a user (or any object for that matter), try to use a unique-valued identifier, such as the UPN or the primary SMTP address. If you use something like display name or alias, you will run into duplicates in almost every organization of size.
There are also some "corner cases" where even properties such as SMTP can be duplicate, such as for example when you have Guest users added. Anyway, in your scenario best run a simple

Get-Recipient "XXX XXXXX"

to see all the matches, or use a different, unique value.

@Vasil Michev 

 

When I try Get-Recipient I get the message: "Get-Recipient: The operation couldn't be performed because object 'XXX XXXXX' couldn't be found on 'CY4PR10A02DC004.NAMPR10A002.PROD.OUTLOOK.COM'."

 

Which makes sense because the user doesn't have a mailbox. 

 

I am not sure what you mean about referencing a user as I don't have a choice in what to enter. Display Name and Email are required fields. 

JohnTwohig_0-1639506236542.png

Thanks

If you want to locate the "duplicate" object, try the same cmdlet with the SMTP and alias values. Or just create the contact via PowerShell *New-MailContact), as it allows you to bypass the check that's causing this issue in the first place.
It sounds like you need to create a mail object for the user in your environment, that way it can be easily referenced, and doesn't have to be an internal object.

I would just create a mail contact.
https://docs.microsoft.com/en-us/exchange/recipients-in-exchange-online/manage-mail-contacts

@bbhorrigan 

 

That is the problem. It won't let me create a mail contact. I didn't realize until I saw the message from @Vasil Michev that using Powershell would bypass the checking. 

 

I was just about to do that when I saw your message that a mail object doesn't have to be internal. I am not sure how to create one but it gives me a direction to try a couple of things. If they don't work for me right away I will just create the mail contact with Powershell.

 

Thanks

Makes sense, let us know if it doesn't work.

@phorrigan2475 

It didn't work in PowerShell. New-MailContact doesn't bypass the checking. I still get the same error message.

 

I don't think I am trying to do something unusual. I think I am missing something so I will try to be more precise about what I am doing:

  • I have a new user FFF LLLL who needs access to some O365 and on-premises resources but doesn't need an O365 mailbox
  • I need to add him to a Distribution List with his personal email address.

So I did the following:

  1. I created the user in our on-premises AD with:
    1. FirstName: FFF
    2. LastName: LLLL
    3. UPN: Email address removed
  2. ADConnect then synced the user to our Azure AD and O365
    1. The user then had access to the O365 resources he needed
  3. I then tried to add a mail contact with a name FFF LLLL and external email Email address removed but got the message that "There are multiple recipients matching identity "FFF LLLL". Please specify a unique value."

Am I trying to go about this the wrong way?

 

The "bypass" that I was referring to is the ability to specify different values for attributes such as alias (mailNickname) via PowerShell, as the UI automatically populates those based on what you provide in other fields and can cause duplications. So use the -Alias, -Name and so on parameters as necessary.

@Vasil Michev 

 

I don't see what you are getting at. No matter what parameters I set I get the same error. What it appears to be saying that I can't add a Mail Contact with the name "FFF LLLL" because I have an O365 user with the name "FFF LLLL". 

 

I could set him up with the name "Person formally known as FFF LLLL" but HR really prefers to use people's real names.

best response confirmed by John Twohig (Iron Contributor)
Solution
Name and Display name are two different parameters, what I'm saying is you should be able to keep display name as "FFF LLLL" while providing a unique value for the Name parameter.

@Vasil Michev 

 

You are absolutely correct. That works perfectly well.

 

I was fixated on the name since we have others where the mail contact has the same name as an AAD account. We recently changed our process to get the accounts set up more quickly so that new people could get access to resources more quickly - sometimes even before their start date. Prior to the change, the mail contact was set up before their AD accounts.

 

I appreciate your patience.

 

Thanks

@John Twohig 

Name is a unique identifier as samAccountName, in the whole domain, you cannot create a contact, user, or group even with the same name, Active Directory will not allow that.

1 best response

Accepted Solutions
best response confirmed by John Twohig (Iron Contributor)
Solution
Name and Display name are two different parameters, what I'm saying is you should be able to keep display name as "FFF LLLL" while providing a unique value for the Name parameter.

View solution in original post