"A user with this name could not be found" error message when you try to reset a password for a user in Office 365

Article translations Article translations
Article ID: 2621753 - View products that this article applies to.
Expand all | Collapse all

PROBLEM

When you try to reset a password for a user in Microsoft Office 365, you receive the following message:
A user with this name could not be found. They may have been deleted.

SOLUTION

To resolve this issue, use Microsoft Azure Active Directory Module for Windows PowerShell to set the user principal name (UPN) to the default domain. Then, change the user principal name back to use the vanity domain. To do this, follow these steps: 
  1. Start Azure Active Directory Module for Windows PowerShell, and connect to Azure Active Directory. 

    Note For more info about Azure Active Directory Module for Windows PowerShell, go to the following Microsoft website: 
  2. Change the UPN of the user to the default domain. To do this, run the following command:
    Set-MsolUserPrincipalName -UserPrincipalName [ExistingUPN] -NewUserPrincipalName [NewUPN]
    For example, use this command:
    Set-MsolUserPrincipalName -UserPrincipalName johnsmith@contoso.com -NewUserPrincipalName johnsmith@contoso.onmicrosoft.com
  3. Change the UPN of the user back to the original domain. To do this, run the following command:
    Set-MsolUserPrincipalName -UserPrincipalName [ExistingUPN] -NewUserPrincipalName [NewUPN]
    For example, use this command:
    Set-MsolUserPrincipalName -UserPrincipalName johnsmith@contoso.onmicrosoft.com -NewUserPrincipalName johnsmith@contoso.com
  4. Reset the password again.

Still need help? Go to the Office 365 Community website.

Properties

Article ID: 2621753 - Last Review: July 9, 2014 - Revision: 19.0
Applies to
  • Microsoft Office 365
  • Office 365 User and Domain Management
Keywords: 
o365 o365a o365e o365m o365022013 o365p KB2621753

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com