This is fairly common issue when sharing files and folders with external users, and this is how we normally fix it.
Issue
The issue is when users try and access the shared document using the link in the email. They click on the link and then see and error like this, saying that their account can’t be found in the directory:
This is pretty confusing for the user, since they received the sharing email correctly, and also for an admin looking at the issue, since if they look in Azure AD they can see the Guest account with the correct email so clearly it does exist.
How it should work
The way that external sharing normally works, is that a file or folder is shared with a user in SharePoint, Teams or OneDrive using the external users email address:
The user receives an email with a link (yes I’m sharing a folder with myself at an external address):
Then they have to validate their email by entering a code:
Accept the agreement:
However sometimes this doesn’t work and they get the user not found in directory error.
What causes this issue?
The issue happens when the user clicks on the link in the email whilst signed in with a different Microsoft account (either work/school or personal). Once that happens, you have to delete the Guest account from Azure AD and SharePoint.
What’s the fix?
The fix for this is as follows:
- Login to the Azure AD portal at https://portal.azure.com
- Click on users, find the external users by searching using their email address. The User type should show as Guest
- Delete the guest account
- Click on Deleted users, and permanently delete the user
- Remove the user from the shared folder or file permissions, by clicking on the info icon on the right.
Also, as a SharePoint admin, check in the SharePoint admin center > More features > User profiles
Click Manage User Profiles
Search for the user and delete if found:
Share the file or folder again, which will create a new guest account for the user in your Azure AD:
Now instruct the external user to right click on the folder icon and choose Copy Hyperlink, then open an Incognito or private browsing tab and paste in there to avoid multiple account issues again:
For more information, see Error message when an external user accepts a SharePoint Online invitation by using another account – SharePoint | Microsoft Docs