How to Fix Error AADSTS9002313 in Office Add-Ins for Personal Accounts
Question details
Users or developers experience authentication failures when logging into Office add-ins with personal Microsoft accounts.

- Product
- Microsoft Office Add-ins
- Device & OS
- not provided
- Scenario
- Developing or authenticating within an Office add-in that requires Microsoft user identity verification.
- Observed behavior
- Work or school accounts authenticate successfully, but personal Microsoft accounts (such as Outlook.com, Live, or Hotmail) return an AADSTS9002313 invalid_grant error.
Ensure you have administrator access to the Azure Portal where your Office add-in's application registration is hosted.
Update Azure App Registration for Multi-Tenant Support
Reconfigure your Azure application registration to accept both organizational directories and personal Microsoft accounts.
The AADSTS9002313 error typically occurs when an app is restricted to work or school accounts, but a user attempts to log in with a personal account. Modifying the supported account types and the authority URL can resolve this conflict.
Navigate to the Microsoft Entra admin center (formerly Azure Active Directory) and select 'App registrations' from the left-hand menu.
Locate and click on the specific application registration that corresponds to your Office add-in.
Under the 'Authentication' blade, locate 'Supported account types'. Change the selection to 'Accounts in any organizational directory and personal Microsoft accounts'.
In your add-in's authentication configuration (e.g., MSAL), ensure the authority endpoint is set to 'https://login.microsoftonline.com/common' rather than a specific tenant ID or the 'organizations' endpoint.

Seek Specialized Developer Assistance
Because this is an Azure identity platform development issue rather than a standard Office support problem, escalating to developer communities is highly recommended.
Try WPS Office for a Seamless Productivity Experience
If complex add-in errors and identity platform configurations are disrupting your workflow in Microsoft Office, consider switching to WPS Office. It provides a lightweight, highly compatible alternative for everyday document needs without the heavy reliance on complex external identity platforms.
- 1. Download the Installer: Visit the official WPS Office website to download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded file and follow the straightforward on-screen instructions to install the software.
- 3. Start Creating: Launch WPS Office to instantly open your existing Word, Excel, or PowerPoint files without encountering complex add-in or identity errors.

Frequently Asked Questions
What does the AADSTS9002313 error mean in Microsoft Office?
The AADSTS9002313 error indicates an 'invalid_grant' issue during the OAuth authentication flow. It means the token, consent, or authorization code provided is invalid or does not match the expected account type, such as attempting to use a personal Microsoft account for an app restricted to organizational tenants.
Why do work accounts succeed while personal accounts fail in my Office add-in?
This happens when the application registration in the Azure Portal is configured as single-tenant ('Accounts in this organizational directory only') instead of multi-tenant with personal account support. The identity platform rejects the personal account because it does not belong to the authorized tenant.
Can I fix Azure app registration errors from within Microsoft Word or Excel?
No. Azure identity platform configuration errors like AADSTS9002313 cannot be fixed within the Office application itself. They must be resolved by the add-in developer within the Azure Portal by updating app registrations, scopes, and authority endpoints.




