Symptoms
When trying to provision a user's OneDrive through PowerShell, you get the following error message :
There is no user on the tenant '<TENANT_URL>' with the email address '<USER_EMAIL>'. Please visit our documentation for more information on this error: <ARTICLE_URL>
Error Code
Not applicable
Details
This error can occur when you have entered the account name of the user instead of their email address. An account name cannot be used to provision a OneDrive, only an email address.
Follow these steps to verify if the user has an email address:
- Access your SharePoint admin center.
- Click user profiles on the left navigation pane.
- Under People, click on Manage User Profiles.
- Search for the user.
Here is a close up of each element on the page:
- The user's account name. It cannot be used to provision the user's OneDrive.
- The user's email address. Use this to provision the user's OneDrive.
- It is possible that the user does not have an email address yet. You need to set the email address for the user first.
Solution
If the user does not have an email address yet, you need to set it up first. Once set up, run the command again with the new email address.
If you got this error but the user as an email address, make sure you did not use the account name (see element (1) in the screenshot above).