AADSTS500014 fix: resource service principal is disabled
Short answer: AADSTS500014 means the API a token was requested for (the resource) has a disabled service principal in the tenant, so Microsoft Entra ID won't issue tokens for it. Microsoft gives two causes: a lapsed subscription or an admin who disabled it. If the resource is a Microsoft service such as Exchange Online, sign-ins break for everyone. Find who disabled it before re-enabling.
Fix: Admin: check the audit log for who disabled the resource named in the error, then set Enterprise applications > that app > Properties > Enabled for users to sign-in? to Yes if it was a mistake. Check the subscription is active. User: tell IT the resource named in the error. Full steps
| Code | AADSTS500014 |
|---|---|
| Microsoft name | InvalidResourceServicePrincipalDisabled |
| Category | App configuration |
| Type | Configuration error |
| Attack signal | Low: usually configuration or user error |
| Microsoft lookup | login.microsoftonline.com/error?code=500014 |
What does AADSTS500014 mean?
Section titled “What does AADSTS500014 mean?”Microsoft’s description:
InvalidResourceServicePrincipalDisabled: The service principal for resource ‘{identifier}’ is disabled. This indicates that a subscription within the tenant has lapsed, or that an administrator for this tenant has disabled the application’s service principal, preventing tokens from being issued for it. For more information, see Disable user sign-in for application.
The disabled object is the resource: the API the token is for, named in the error. The client app the user opened can be perfectly fine.
The switch is the enterprise application’s Enabled for users to sign-in? property. Microsoft describes what No does: “no users are able to sign in to the application, even if they’re assigned to it. Tokens aren’t issued for the application. This setting not only prevents users from signing in but also restricts service principals from accessing the application using application permissions.” In Microsoft Graph it is the service principal’s accountEnabled property.
How it differs from 7000112: both come from the same switch. Our reading: 7000112 is returned when the disabled app is the client being signed in to, and 500014 when it is the resource a token is requested for. Microsoft’s Exchange Online troubleshooting article shows 7000112 for a disabled Exchange Online service principal on the Microsoft 365 portal. Users report 500014 for the same disabled service principal when Exchange is the resource, for example in Outlook sync tools. Which code you get depends on the request; Microsoft doesn’t spell this out. Treat the split as a rough guide: in Microsoft’s own Exchange example, Exchange is arguably the resource, and it still shows 7000112.
How it differs from 500011: 500011 means the resource has no service principal in the tenant. 500014 means it has one and it is switched off.
Is it an attack?
Section titled “Is it an attack?”The error itself is not. It is a block working. What matters is who disabled the resource, and whether it was a Microsoft service.
| Pattern | Likely meaning |
|---|---|
| 500014 for your own API, after someone disabled it | Working as intended. Clients can no longer get tokens for it. |
| 500014 naming a Microsoft service (Exchange Online, a Microsoft app ID) for many users, or on the Azure portal | Someone disabled a Microsoft service principal in your tenant, or a subscription lapsed. Users report it for the Azure portal, with Microsoft Graph as the resource, and for Dynamics environments. Check the audit log first. |
| 500014 for a Dynamics 365 environment URL with an active subscription | Users report this too. The environment’s service principal may be disabled; check its Enabled for users to sign-in? setting. |
| 500014 after a licence or trial ended | Microsoft names a lapsed subscription as a cause. |
A disabled Microsoft first-party service principal is worth a second look. Our reading, not a Microsoft statement: if nobody on your team disabled it on purpose, treat the account that did as suspect until you know, because switching off a core service is a quick way to cause a tenant-wide outage.
How do I find it in my logs (KQL)?
Section titled “How do I find it in my logs (KQL)?”Microsoft doesn’t document which sign-in table 500014 lands in. A disabled resource blocks both user and app-only tokens, so it can appear in all three. Check where it lands:
union withsource=SourceTable SigninLogs, AADNonInteractiveUserSignInLogs, AADServicePrincipalSignInLogs| where TimeGenerated > ago(7d)| where ResultType == "500014"| summarize Rows = count(), Resources = dcount(ResourceIdentity) by SourceTableWhich resources are disabled, how many users and apps are hitting them, and since when:
union SigninLogs, AADNonInteractiveUserSignInLogs, AADServicePrincipalSignInLogs| where TimeGenerated > ago(7d)| where ResultType == "500014"| summarize Rows = count(), Users = dcount(UserPrincipalName), ClientApps = make_set(coalesce(AppDisplayName, ServicePrincipalName), 10), FirstSeen = min(TimeGenerated) by ResourceIdentity, ResourceDisplayName| sort by Users descWho changed a service principal, and when. Microsoft’s audit log reference lists Update service principal in the ApplicationManagement category. Disabling an enterprise app is likely logged as that activity; Microsoft doesn’t say so:
AuditLogs| where TimeGenerated > ago(30d)| where Category == "ApplicationManagement"| where OperationName == "Update service principal"| mv-expand Target = TargetResources| mv-expand Prop = Target.modifiedProperties| where tostring(Prop.displayName) == "AccountEnabled"| project TimeGenerated, App = tostring(Target.displayName), ServicePrincipalId = tostring(Target.id), OldValue = tostring(Prop.oldValue), NewValue = tostring(Prop.newValue), ByUser = tostring(InitiatedBy.user.userPrincipalName), ByApp = tostring(InitiatedBy.app.displayName)| sort by TimeGenerated descThe modified property name AccountEnabled is an assumption based on the Graph property, not checked against Microsoft documentation. If the query returns nothing, drop that line and read the modifiedProperties of the rows yourself. Non-interactive and service principal sign-in rows are aggregated, so row counts there are not request counts. ResultType is a string column, so compare it with "500014".
How does Conditional Access affect it?
Section titled “How does Conditional Access affect it?”- 500014 is not a Conditional Access block. A disabled resource gets no tokens, whatever your policies say.
- Don’t confuse it with 53003, which is a Conditional Access block. The fix and the owner are different.
How do I fix AADSTS500014?
Section titled “How do I fix AADSTS500014?”For the user: you can’t fix this yourself. Tell your IT team which resource the error names.
For developers: if your API is the resource and a customer gets 500014, the customer’s admin disabled your API’s service principal in their tenant, or their subscription lapsed. You can’t re-enable it from your side.
For admins:
- Read the resource from the error. Find it under Enterprise applications (remove the default filters and search by application ID).
- Find out who disabled it and why with the audit log query, before changing anything. If it was disabled during an incident, leave it.
- Check that the subscription behind the service is active. Microsoft names a lapsed subscription as the other cause.
- If it was a mistake: in Enterprise applications > the app > Properties, set Enabled for users to sign-in? to Yes. In Microsoft Graph, set
accountEnabledtotrue. Microsoft documentsaccountEnabledas “trueif the service principal account is enabled”. With Microsoft Graph PowerShell:This mirrors Microsoft’s disable command withTerminal window Connect-MgGraph -Scopes "Application.ReadWrite.All"$sp = Get-MgServicePrincipal -Filter "appId eq '<resource app ID>'"$sp.AccountEnabledUpdate-MgServicePrincipal -ServicePrincipalId $sp.Id -AccountEnabled:$true$true. Microsoft’s page shows only the disable direction. - For Exchange Online, the app ID is
00000002-0000-0ff1-ce00-000000000000. Microsoft’s article uses the deprecated MSOnline module for this; use Microsoft Graph PowerShell as above. - If the app registration was deactivated globally by its owner, that is a different switch (
isDisabled). Microsoft notes that reactivating it “doesn’t enable tenant-local sign-in if a service principal’saccountEnabledremainsfalse”. Check both.
Related codes
- AADSTS7000112: The application is disabled
- AADSTS500011: The resource principal was not found in the tenant
- AADSTS700016: Application not found in the directory
- AADSTS650052: app needs a service your tenant lacks
- AADSTS50001: resource disabled or doesn't exist
Sources
- Microsoft Entra authentication and authorization error codes
- Disable user sign-in for an application
- Properties of an enterprise application
- servicePrincipal resource type (Microsoft Graph)
- Deactivate an app registration
- "Sorry, but we're having trouble signing you in" error when signing in to Microsoft 365
- Microsoft Entra audit log categories and activities
- SigninLogs table reference (Azure Monitor)
- Microsoft Tech Community: Response AADSTS500014 error (user reports)
- Microsoft Q&A: Azure portal sign-in failed, AADSTS500014 (user report)
- Microsoft Q&A: The service principal for resource is disabled (user report)
- Sync365 KB: AADSTS500014 Exchange Online service principal disabled (vendor KB)