Forum Discussion

John Twohig's avatar
John Twohig
Iron Contributor
Dec 13, 2021

Adding to Distribution List

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.

  • 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.
  • 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.
    • John Twohig's avatar
      John Twohig
      Iron Contributor

      VasilMichev 

       

      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. 

      Thanks

      • VasilMichev's avatar
        VasilMichev
        MVP
        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.

Share