How the attack works
An application from outside the organization enters a tenant when somebody consents to it. Consent creates a service principal for the application in the tenant and grants it the permissions it asked for, such as reading mail or files. Attackers publish applications for exactly this purpose and persuade users or administrators to accept the consent prompt. The application then reads the data with its own tokens, and a password reset or MFA for the user changes nothing about that.
Microsoft watches applications across its tenants and acts on the ones that break its terms. The workload identity risk detection "Malicious application" (maliciousApplication) combines alerts from ID Protection and Microsoft Defender for Cloud Apps and indicates that Microsoft disabled an application for violating its terms of service. The application and its service principal then show DisabledDueToViolationOfServicesAgreement in the disabledByMicrosoftStatus property, and the objects cannot be deleted, which prevents the application from being instantiated in the organization again. "Suspicious application" (suspiciousApplication) indicates that ID Protection or Defender for Cloud Apps identified an application that might be violating the terms of service but has not disabled it.
For both detections Microsoft recommends an investigation of the application. A detection means the application has a service principal in the tenant, because somebody consented to it or registered it there. What matters is who did, which permissions it holds and what it did with them before Microsoft stepped in. Both detections are calculated offline and are written to the AADServicePrincipalRiskEvents table through the ServicePrincipalRiskEvents diagnostic setting.
What an attacker needs
- A user who can be persuaded to consent to the application, and a tenant that lets users consent to the permissions it asks for.
- Or an administrator who grants consent for the whole organization.
Impact
Access to whatever the application was granted, with tokens of its own that do not depend on the user's password or MFA. For the malicious application detection the access has ended, because Microsoft disabled the application, but the data it could reach until then has to be treated as exposed. For the suspicious application detection the application still works.
Detection rules
ID Protection Reported an Application Disabled by Microsoft as Malicious
Detects the Microsoft Entra ID Protection workload identity risk detection "Malicious application" (riskEventType maliciousApplication). Microsoft documents that it combines alerts from ID Protection and Microsoft Defender for Cloud Apps to indicate when Microsoft disables an application for violating its terms of service, and recommends conducting an investigation of the application. The application and its service principal show DisabledDueToViolationOfServicesAgreement in the disabledByMicrosoftStatus property and cannot be deleted. The detection is calculated offline. It means that the application has a service principal in the tenant, because somebody consented to it or registered it there. The records reach a SIEM through the ServicePrincipalRiskEvents diagnostic setting of Microsoft Entra ID. The application is in ServicePrincipalDisplayName and AppId.
title: ID Protection Reported an Application Disabled by Microsoft as Malicious
id: 6bf6c7b2-7ae5-4379-9a4d-00afaa4f8973
status: experimental
description: >-
Detects the Microsoft Entra ID Protection workload identity risk detection
"Malicious application" (riskEventType maliciousApplication). Microsoft
documents that it combines alerts from ID Protection and Microsoft Defender
for Cloud Apps to indicate when Microsoft disables an application for
violating its terms of service, and recommends conducting an investigation
of the application. The application and its service principal show
DisabledDueToViolationOfServicesAgreement in the disabledByMicrosoftStatus
property and cannot be deleted. The detection is calculated offline. It
means that the application has a service principal in the tenant, because
somebody consented to it or registered it there. The records reach a SIEM through the
ServicePrincipalRiskEvents diagnostic setting of Microsoft Entra ID. The
application is in ServicePrincipalDisplayName and AppId.
references:
- https://learn.microsoft.com/en-us/entra/id-protection/concept-workload-identity-risk
- https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/aadserviceprincipalriskevents
- https://learn.microsoft.com/en-us/entra/id-protection/howto-export-risk-data
- https://attack.mitre.org/techniques/T1528/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1528
logsource:
product: azure
service: sp-riskdetection
detection:
selection:
RiskEventType: maliciousApplication
condition: selection
falsepositives:
- None documented. Microsoft raises the detection after it disabled the application, so investigate every event.
level: high
False positives
- None documented. Microsoft raises the detection after it disabled the application, so investigate every event.
ID Protection Reported a Suspicious Application That Is Still Enabled
Detects the Microsoft Entra ID Protection workload identity risk detection "Suspicious application" (riskEventType suspiciousApplication). Microsoft documents that it indicates that ID Protection or Microsoft Defender for Cloud Apps identified an application that might be violating its terms of service but has not disabled it, and recommends conducting an investigation of the application. Unlike the malicious application detection, the application keeps working, so its permission grants stay in force until somebody in the tenant removes them or disables the service principal. The detection is calculated offline. The records reach a SIEM through the ServicePrincipalRiskEvents diagnostic setting of Microsoft Entra ID. The application is in ServicePrincipalDisplayName and AppId.
title: ID Protection Reported a Suspicious Application That Is Still Enabled
id: 14b0e800-3138-42d1-afac-b6d8c300ed10
status: experimental
description: >-
Detects the Microsoft Entra ID Protection workload identity risk detection
"Suspicious application" (riskEventType suspiciousApplication). Microsoft
documents that it indicates that ID Protection or Microsoft Defender for
Cloud Apps identified an application that might be violating its terms of
service but has not disabled it, and recommends conducting an investigation
of the application. Unlike the malicious application detection, the
application keeps working, so its permission grants stay in force until
somebody in the tenant removes them or disables the service principal. The
detection is calculated offline. The records reach a SIEM through the
ServicePrincipalRiskEvents diagnostic setting of Microsoft Entra ID. The
application is in ServicePrincipalDisplayName and AppId.
references:
- https://learn.microsoft.com/en-us/entra/id-protection/concept-workload-identity-risk
- https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/aadserviceprincipalriskevents
- https://learn.microsoft.com/en-us/entra/id-protection/howto-export-risk-data
- https://attack.mitre.org/techniques/T1528/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1528
logsource:
product: azure
service: sp-riskdetection
detection:
selection:
RiskEventType: suspiciousApplication
condition: selection
falsepositives:
- Microsoft says the application might be violating its terms of service, so a legitimate application can be flagged. Check the publisher, who consented and what the application is used for, and dismiss the risk in ID Protection when it is known and wanted.
level: medium
False positives
- Microsoft says the application might be violating its terms of service, so a legitimate application can be flagged. Check the publisher, who consented and what the application is used for, and dismiss the risk in ID Protection when it is known and wanted.
Triage
- Read the detection. ServicePrincipalDisplayName, AppId and ServicePrincipalId name the application, and RiskEventType says whether Microsoft disabled it or only suspects it.
- Find how the application came into the tenant. Search the audit log for
Consent to application,Add delegated permission grantandAdd app role assignment to service principalfor that service principal, and note who consented and when. - List the delegated and application permissions it holds, and for which users.
- Review the sign-ins of the service principal and, if you collect it, the Microsoft Graph activity log for its AppId, to see what it read.
- Check the users who consented for other signs of compromise, such as inbox rules and unfamiliar sign-ins. A consent prompt often arrives with a phishing message.
Response
Once the attack is confirmed:
- For a suspicious application that is still enabled, disable the service principal at once so that it cannot sign in.
- Remove the delegated permission grants and the app role assignments of the application, and revoke the sessions of the users who consented.
- Treat the data the application could reach as exposed for the time between the consent and the removal, and review mailboxes for rules or messages it created.
- Find the message or site that led users to the consent prompt, block it and look for other users who received it.
- Confirm the service principal as compromised in ID Protection when the investigation shows abuse, and dismiss the risk when the application turns out to be legitimate.
- Tighten the user consent settings if a user was able to grant the permissions on their own.
Mitigation
- Limit user consent to applications from verified publishers and to low-impact permissions, and route everything else through an admin consent workflow.
- Review the applications that hold permissions in the tenant and remove the grants nobody uses.
- Teach users that a consent prompt is a request for access to their data, and that an unexpected one should be refused and reported.
- Send the
ServicePrincipalRiskEventsdiagnostic category to your SIEM and treat both detections as incidents.
Frequently asked questions
Microsoft already disabled the application. Is there anything left to do?
Yes. Disabling stops further access. It does not tell you who consented, which permissions the application held or what it read before it was disabled. Microsoft recommends an investigation of the application. Establish those three things, treat the reachable data as exposed and check the users who consented for other signs of compromise.
Why can the disabled application not be deleted from the tenant?
Microsoft states that these objects cannot be deleted, to prevent the application from being instantiated in your organization again in the future. The application and its service principal show DisabledDueToViolationOfServicesAgreement in the disabledByMicrosoftStatus property in Microsoft Graph.
What is the difference between the malicious and the suspicious application detection?
Malicious application indicates that Microsoft disabled the application for violating its terms of service. Suspicious application indicates that ID Protection or Microsoft Defender for Cloud Apps identified an application that might be violating the terms of service but has not disabled it, so the application still works and the decision is yours.
Does resetting the user's password remove the application's access?
No. After consent the application holds its own permission grant and gets its own tokens. They do not depend on the password or the MFA of the user who consented. The access ends when the grant is removed or the service principal is disabled.
References
- MITRE ATT&CK T1528: Steal Application Access Token
- Securing workload identities (Malicious application and Suspicious application detections)
- AADServicePrincipalRiskEvents table reference
- How to export risk data (ServicePrincipalRiskEvents diagnostic setting)
- Microsoft Entra audit log activities (consent and permission grant activities)