How to Fix User Not in Directory Error in Shared Excel Files
Question details
The user cannot access a shared Excel spreadsheet and receives a User not in directory error message.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Attempting to open a shared Excel spreadsheet using an external email account, such as a Gmail address.
- Observed behavior
- Access is denied, and the system prompts a User not in directory error because the external email is not registered as a guest in the organization's Microsoft Entra ID directory, or browser credentials are conflicting.
Ensure you know the exact email address the spreadsheet was shared with, and verify that you have contact with the organization's IT administrator or the person who shared the file.
Request Administrator to Add You as a Guest User in Microsoft Entra ID
Use this solution to resolve the root cause of the permission error. External users must be authenticated in the organization's directory before they can access secure shared files.
Microsoft 365 environments often restrict file sharing to authenticated users. If you are using an external email (like Gmail), the organization's admin must manually add you as a guest user in their Microsoft Entra ID (formerly Azure AD) tenant.
Reach out to the person who shared the Excel file and ask them to contact their IT administrator.
The IT administrator needs to open the Microsoft Entra admin center, navigate to Users > All users, and select 'New guest user' to invite your external email address.
Check your email inbox for a Microsoft invitation. Click the 'Accept invitation' link in the email to register your account in their directory.
Once you have accepted the invitation, ask the file owner to generate a new sharing link for the Excel file and send it to you.

Clear Browser Cache and Sign In with the Correct Account
Use this method if you have already been added to the directory but still face access issues due to conflicting saved credentials.
Experience Seamless File Sharing with WPS Office
If you want to avoid complex directory permissions and Microsoft Entra ID configurations, try WPS Office. It provides a lightweight, highly compatible alternative that makes sharing and collaborating on spreadsheets simple and hassle-free.
- 1. Download WPS Office: Visit the official WPS website to download and install the free office suite on your device.
- 2. Open Your Spreadsheets: Launch WPS Spreadsheet and open your existing .xlsx files directly without formatting loss.
- 3. Share with Ease: Use the built-in sharing features to collaborate with anyone via a simple web link, bypassing complex enterprise directory setups.

Frequently Asked Questions
Why do I get a User not in directory error if the Excel file was explicitly shared with me?
Even if a file is shared with your specific email address, enterprise security policies in Microsoft 365 often require external emails to be officially registered as 'guest users' within their Microsoft Entra ID directory before access is granted.
Can I access a shared Microsoft Excel file with a Gmail account?
Yes, but the organization sharing the file must allow external guest sharing. You will receive an email invitation to verify your Gmail account and join their directory as a guest before you can open the file.
Does clearing the browser cache actually fix Excel access errors?
Yes, if your browser is automatically logging you in with a different personal or work Microsoft account, clearing the cache (or using an Incognito window) forces the system to prompt you for the correct login credentials associated with the shared file.




