1. Resources
  2. Detection rules
  3. Application Flagged as Malicious or Suspicious by Microsoft

Application Flagged as Malicious or Suspicious by Microsoft detection rules

An application that somebody let into the tenant turns out to be hostile. Microsoft disables it or marks it as suspicious, and Microsoft Entra ID Protection raises a workload identity risk detection for its service principal.

Platform
Microsoft Entra ID
Severity
High
Log source
Microsoft Entra ID Protection workload identity risk detections
Last updated
Rule formats
Sigmaand queries for: Microsoft Sentinel
What an attacker needs
A user who can be persuaded to accept a consent prompt in a tenant that allows user consent, or an administrator who grants consent for the organization.
Impact
Access to the mail, files or directory data the application was granted, with tokens of its own that outlast a password reset of the user.
Response
Disable the service principal if it is still enabled, remove its permission grants, and treat the data it could reach as exposed.
Mitigation
Limit user consent to verified publishers and low-impact permissions, and send other requests through an admin consent workflow.
Risk detection types
maliciousApplicationsuspiciousApplication

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.

LevelHighStatusExperimentalLog sourceMicrosoft Entra ID Protection workload identity risk detections
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.

LevelMediumStatusExperimentalLog sourceMicrosoft Entra ID Protection workload identity risk detections
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 grant and Add app role assignment to service principal for 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:

  1. For a suspicious application that is still enabled, disable the service principal at once so that it cannot sign in.
  2. Remove the delegated permission grants and the app role assignments of the application, and revoke the sessions of the users who consented.
  3. 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.
  4. Find the message or site that led users to the consent prompt, block it and look for other users who received it.
  5. 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.
  6. 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 ServicePrincipalRiskEvents diagnostic 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

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.