none
Error message in the Office 365 portal: "A user with this name already exists. Use a different name." RRS feed

  • Question

  • Hi gents,

    at this point I am starting to pull my hair out trying to figure out what is going on. Basically I am trying to provision a new user name in Office 365 and am receiving following error message "A user with this name already exists. Use a different name."

    This issue actually occurs when I try to assign an Exchange Online license to the user - the licensing attempt fails because the provisioning process determines that another object already has a user name or an email address that matches the user name that's being created.

    I've been trying to figure out where the primary SMTP address may be in use, but I came up emptry thus far.

    Here are PowerShell cmdlets I tried running against the tenant:

    $UserCredential = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
    Import-PSSession $Session
    Get-Mailbox -Identity "Name"
    get-mailbox| where {$_.EmailAddresses -match "username@contoso.com"} | fl Name, RecipientType, EmailAddresses

    $msolcred = get-credential
    connect-msolservice -credential $msolcred
    get-msoluser

    Any suggestions?


    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".

    Wednesday, September 13, 2017 4:39 PM

Answers

  • Hi gents,

    at this point I am starting to pull my hair out trying to figure out what is going on. Basically I am trying to provision a new user name in Office 365 and am receiving following error message "A user with this name already exists. Use a different name."

    This issue actually occurs when I try to assign an Exchange Online license to the user - the licensing attempt fails because the provisioning process determines that another object already has a user name or an email address that matches the user name that's being created.

    I've been trying to figure out where the primary SMTP address may be in use, but I came up emptry thus far.

    Here are PowerShell cmdlets I tried running against the tenant:

    $UserCredential = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
    Import-PSSession $Session
    Get-Mailbox -Identity "Name"
    get-mailbox| where {$_.EmailAddresses -match "username@contoso.com"} | fl Name, RecipientType, EmailAddresses

    $msolcred = get-credential
    connect-msolservice -credential $msolcred
    get-msoluser

    Any suggestions?


    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".


    $Duplicateuser = "user@contoso.com"
    get-contact -resultsize unlimited | where {$_.WindowsEmailAddress -match "$Duplicateuser"} |ft identity 
    get-msoluser -All | where {$_.ProxyAddresses -match "$Duplicateuser"} |select UserPrincipalName
    Get-MsolGroup -resultsize unlimited  | where {$_.ProxyAddresses -match "$Duplicateuser"} |ft displayname, emailaddress 
    get-mailbox -Result unlimited| where {$_.EmailAddresses -match "$Duplicateuser"} | fl Name, RecipientType, EmailAddresses 
    get-DistributionGroup -resultsize unlimited | where {$_.EmailAddresses -match "$Duplicateuser"} | fl Name, EmailAddresses 
    get-user -ResultSize Unlimited| where {$_.WindowsEmailAddress -match "$Duplicateuser"} |ft identity
    Get-Recipient -ResultSize Unlimited| where {$_.EmailAddresses -match "$DuplicateUser"} | Select -Expand EmailAddresses Aliases
    Wednesday, September 13, 2017 5:36 PM
    Moderator
  • And ... done. Andy gave me the push in the right direction - I had a contact with the exactly same proxy address, which caused the provisioning process to fail. I summarized my troubleshooting steps in a blog post: http://www.vacuumbreather.com/index.php/blog/cases-of-the-unexplained/item/42-the-case-of-existing-email-address

    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".

    • Marked as answer by Anton Romanyuk Thursday, September 14, 2017 1:31 PM
    Thursday, September 14, 2017 1:31 PM

All replies

  • Hi gents,

    at this point I am starting to pull my hair out trying to figure out what is going on. Basically I am trying to provision a new user name in Office 365 and am receiving following error message "A user with this name already exists. Use a different name."

    This issue actually occurs when I try to assign an Exchange Online license to the user - the licensing attempt fails because the provisioning process determines that another object already has a user name or an email address that matches the user name that's being created.

    I've been trying to figure out where the primary SMTP address may be in use, but I came up emptry thus far.

    Here are PowerShell cmdlets I tried running against the tenant:

    $UserCredential = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
    Import-PSSession $Session
    Get-Mailbox -Identity "Name"
    get-mailbox| where {$_.EmailAddresses -match "username@contoso.com"} | fl Name, RecipientType, EmailAddresses

    $msolcred = get-credential
    connect-msolservice -credential $msolcred
    get-msoluser

    Any suggestions?


    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".


    $Duplicateuser = "user@contoso.com"
    get-contact -resultsize unlimited | where {$_.WindowsEmailAddress -match "$Duplicateuser"} |ft identity 
    get-msoluser -All | where {$_.ProxyAddresses -match "$Duplicateuser"} |select UserPrincipalName
    Get-MsolGroup -resultsize unlimited  | where {$_.ProxyAddresses -match "$Duplicateuser"} |ft displayname, emailaddress 
    get-mailbox -Result unlimited| where {$_.EmailAddresses -match "$Duplicateuser"} | fl Name, RecipientType, EmailAddresses 
    get-DistributionGroup -resultsize unlimited | where {$_.EmailAddresses -match "$Duplicateuser"} | fl Name, EmailAddresses 
    get-user -ResultSize Unlimited| where {$_.WindowsEmailAddress -match "$Duplicateuser"} |ft identity
    Get-Recipient -ResultSize Unlimited| where {$_.EmailAddresses -match "$DuplicateUser"} | Select -Expand EmailAddresses Aliases
    Wednesday, September 13, 2017 5:36 PM
    Moderator
  • Thanks, Andy. Most of the queries are coming up empty with the exception of Get-Recipient.

    I would assume that at some point last year I created a mailbox with the same name, which I then either removed or renamed. I could, of course, work around the issue by issuing a different mailbox name (firstname.lastname instead of firstletter.lastname), but I would love to figure out what the heck is going on. :)


    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".

    Wednesday, September 13, 2017 9:22 PM
  • Hi Anton,

    This is a known issue in office 365, here is an article explain this issue and provide the solution to fix it in details, for your reference:

    You receive the following error message in the Office 365 portal: "A user with this name already exists. Use a different name."


    Best Regards,


    Niko Cheng
    TechNet Community Support


    Please remember to mark the replies as answers.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Thursday, September 14, 2017 7:13 AM
    Moderator
  • And ... done. Andy gave me the push in the right direction - I had a contact with the exactly same proxy address, which caused the provisioning process to fail. I summarized my troubleshooting steps in a blog post: http://www.vacuumbreather.com/index.php/blog/cases-of-the-unexplained/item/42-the-case-of-existing-email-address

    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".

    • Marked as answer by Anton Romanyuk Thursday, September 14, 2017 1:31 PM
    Thursday, September 14, 2017 1:31 PM