User not in directory


User not in directory, External access issue on SharePoint Online


User can’t be found in the directory. This is a common issue when your external users have accepted the invitation email with the link by using another email(that differs than the one that was invited) to log on your tenant. Then now he is trying to access by using the one was invited. That will be a problem with access.

When you invite/share something in SharePoint Online with someone outside your organization. SharePoint Online will store the emails once it sends out the invitation. So when the invited external user accepted the invitation and log on your SharePoint tenant with an email that differs than the one that was invited. This email will be marked as login credential for the invitation email. For instance, you invite/share something on your SharePoint tenant with When this user received the invitation email, he/she clicks on the link in the email and login with his/her personal email, such So it means that on your SharePoint tenant will have the login credential is, not
If you try to invite/share the user to any other contents on your SharePoint tenant again, they also have to use the login credential
If you run the power-shell command to get the information about the external user, you will see something like a picture as below:


Okay so, how to resolve it? There are two steps to accomplish it (the order of steps doesn’t matter)
First, you need to remove the user, for example,, from SharePoint front-end by following below steps or this article:

Delete selected users from site collection
Second, use SPO PowerShell to remove the user from your tenant:

  • Connect to your SharePoint tenant by following below command then enter your tenant admin credential

Connect-SPOService -Url -credential

  • Get User’s UniqueID by running


  • Delete user by running

    Remove-SPOExternalUser -UniqueIDs {id}

Delete external user
Finally, do re-invite the user again. then you should good to go.