Microsoft 365 Error Codes

How to Fix Error AADSTS9002313 in Office Add-Ins for Personal Accounts

Steve KSteve K Nov 3, 2026 871 views

Question details

Users or developers experience authentication failures when logging into Office add-ins with personal Microsoft accounts.

Fix AADSTS9002313 Error for Personal Microsoft Accounts in Office Add-Ins
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.
Before you start

Ensure you have administrator access to the Azure Portal where your Office add-in's application registration is hosted.

Solution 1Recommended

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.

1
Sign in to Azure Portal

Navigate to the Microsoft Entra admin center (formerly Azure Active Directory) and select 'App registrations' from the left-hand menu.

2
Select Your Add-in Registration

Locate and click on the specific application registration that corresponds to your Office add-in.

3
Modify Supported Account Types

Under the 'Authentication' blade, locate 'Supported account types'. Change the selection to 'Accounts in any organizational directory and personal Microsoft accounts'.

4
Update Authority in Code

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.

Update Azure App Registration for Multi-Tenant Support
Code Update Required: After changing settings in the Azure Portal, remember to clear your token cache and redeploy your add-in to ensure the new authority settings take effect.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website to download the free installation package for your operating system.
  2. 2. Install WPS Office: Run the downloaded file and follow the straightforward on-screen instructions to install the software.
  3. 3. Start Creating: Launch WPS Office to instantly open your existing Word, Excel, or PowerPoint files without encountering complex add-in or identity errors.
Fully compatible with Microsoft Office formats including DOCX, XLSX, and PPTX.Lightweight installation and incredibly fast startup times.Free to use with a familiar, user-friendly tabbed interface.Eliminates complex Azure AD authentication requirements for local document editing.
microsoft office alternative - wps office

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.