SharePoint Online Troubleshooting: We're sorry, but [username] can't be found in the [tenant URL] directory
Issue
Sometimes, a user who has a valid organizational network account or is a guest user who has received a sharing invitation connects to a SharePoint Online site and then experiences this message:
That didn't work
We're sorry, but [username] can't be found inA the [tenant directory URL] directory.
Please try again later, while we try to automatically fix this for you...
Solution
The approach you can take to resolve this involves the following steps:
- Remove the user from the site using the SharePoint Hidden User list: [site URL]/_layouts/15/people.aspx?MembershipGroupId=0
- Connect to the O365 Admin Center, and then go: Show All > SharePoint > User Profiles > People > Manage User Profiles > [search for the user, and then delete the user profile].
- At the O365 Admin Center, expand users, select Active users, search for the user, and then delete the user.
- Have the user try connecting to the site again.
The steps above resolve 95% of all such issues. If they don't, and the user is a known member of the organization, check with the AD team to verify the user has a valid account.
O365 ticket
Otherwise, open an O365 support ticket.
References
- SharePoint: Troubleshooting “User cannot be found” and other mysterious user behavior
- “Access Denied”, “You need permission to access this site”, or “User not found in the directory” errors in SharePoint Online and OneDrive for Business
- What is Hidden User Information (Userinfo) List in SharePoint 2010/2013 and how to fix when it causes a site collection to show old User metadata properties in People Picker control or in a Person or Group column? (used the cached version if this link remains broken)