1. Resources
  2. Detection rules
  3. Sign-In With the Resource Owner Password Credentials Flow

Sign-In With the Resource Owner Password Credentials Flow detection rules

The OAuth resource owner password credentials (ROPC) flow sends a user name and password straight to the token endpoint and cannot perform MFA. Attackers use it to test stolen passwords and to get tokens where MFA is not enforced.

Platform
Microsoft Entra ID
Severity
Medium
Log source
Microsoft Entra ID sign-in logs
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft Sentinel
What an attacker needs
The user's password, an account whose password Microsoft Entra ID can validate, and no MFA requirement for that account and resource.
Impact
Access and refresh tokens for the user, issued without MFA, with which the attacker reads mail, files and directory data through the APIs.
Response
Revoke the sessions and refresh tokens of the user, reset the password, and remove the exclusion that let a password alone work.
Mitigation
Require MFA for all users and all resources with Conditional Access, because the flow cannot satisfy MFA and these sign-ins are then blocked.

How the attack works

The OAuth 2.0 resource owner password credentials (ROPC) grant lets an application sign a user in by handling the password itself. The application sends the user name and the password to the token endpoint in a single request and receives tokens in return. There is no browser and no sign-in page. Microsoft recommends not using the flow. It requires a very high degree of trust in the application, and it is incompatible with MFA, so a user who has to complete MFA is blocked instead of prompted.

The same properties make the flow useful to an attacker who holds passwords from phishing, a breach or guessing. One scripted request shows whether a password is valid, which suits password spraying and the replay of leaked credentials. If nothing requires MFA for that account and resource, the request also returns access and refresh tokens, and the attacker never has to face a prompt. A successful ROPC sign-in is therefore proof that a password alone was enough.

The sign-in log records the flow in AuthenticationProtocol with the value ropc. Microsoft's security operations guide for applications lists successful sign-ins with this protocol as something to monitor and says the flow should only be used in automated testing of applications, if at all.

What an attacker needs

  • The user's password.
  • An account whose password Microsoft Entra ID can validate (a cloud-only account, password hash synchronization or pass-through authentication). The flow is not supported for federated users unless the tenant has enabled direct password validation for them.
  • No MFA requirement for that account and resource, for example because of an exclusion in Conditional Access. Where MFA is required, the request is blocked.

Impact

Access and refresh tokens for the user, issued without MFA. With them the attacker reads mail, files and directory data through the APIs, and the refresh token keeps the access alive. Even when the tokens are of little use, the attacker has confirmed a working password to try elsewhere.

Detection rules

Successful Sign-In With the Resource Owner Password Credentials Flow

Detects a successful sign-in that used the OAuth resource owner password credentials flow (AuthenticationProtocol ropc). The application sent the user's password directly to the token endpoint and no MFA took place. Microsoft recommends monitoring successful sign-ins with this protocol and using the flow only in automated testing, if at all. The non-interactive user sign-in log has the same column; run the same filter there (AADNonInteractiveUserSignInLogs in Sentinel) for full coverage.

LevelMediumStatusExperimentalLog sourceMicrosoft Entra ID sign-in logs
title: Successful Sign-In With the Resource Owner Password Credentials Flow
id: 68a5e373-b27b-46ac-8f99-045939536205
status: experimental
description: >-
  Detects a successful sign-in that used the OAuth resource owner password
  credentials flow (AuthenticationProtocol ropc). The application sent the
  user's password directly to the token endpoint and no MFA took place.
  Microsoft recommends monitoring successful sign-ins with this protocol and
  using the flow only in automated testing, if at all. The non-interactive
  user sign-in log has the same column; run the same filter there
  (AADNonInteractiveUserSignInLogs in Sentinel) for full coverage.
references:
  - https://learn.microsoft.com/en-us/entra/architecture/security-operations-applications
  - https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth-ropc
  - https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/signinlogs
  - https://attack.mitre.org/techniques/T1078/004/
author: Forestall
date: 2026-11-14
tags:
  - attack.initial-access
  - attack.t1078.004
logsource:
  product: azure
  service: signinlogs
detection:
  selection:
    AuthenticationProtocol: ropc
    ResultType: '0'  # string column: "0" is success
  condition: selection
falsepositives:
  - Automated tests, legacy line-of-business applications and scripts that sign in with a user name and password. Inventory them, then add a filter on their AppId or UserPrincipalName until they are migrated to another flow.
level: medium

False positives

  • Automated tests, legacy line-of-business applications and scripts that sign in with a user name and password. Inventory them, then add a filter on their AppId or UserPrincipalName until they are migrated to another flow.

Triage

  • Identify the user, the client application (AppDisplayName, AppId), the resource and the IP address. Is the application one your organization develops or tests with this flow?
  • Compare the IP address, location and user agent with the user's normal sign-ins.
  • Look for failed sign-ins with the same protocol from the same IP address against other accounts. A run of failures before the success points to password spraying.
  • Find out why MFA was not required. Check which Conditional Access policies applied to the sign-in and which exclusion let it through.
  • If the sign-in is not legitimate, reset the password, revoke the user's sessions, review what the account did afterwards and close the gap in the MFA policy.

Response

Once the attack is confirmed:

  1. Revoke the sessions and refresh tokens of the user, then reset the password. Whoever made the request knows the password.
  2. Remove the exclusion that let a password alone work, whether it is an excluded account, an excluded application or a trusted location in the MFA policy.
  3. Review what was read with the tokens, such as mail, files and directory data, and remove authentication methods, inbox rules and consents added since the sign-in.
  4. Check the other accounts the same IP address tried with this protocol. Reset every account it signed in to, and treat the failures as passwords that were tested.
  5. Confirm that a later request with this flow for the account is blocked because MFA is required.

Mitigation

  • Require MFA for all users and all resources with Conditional Access. The flow cannot satisfy MFA, so these sign-ins are blocked.
  • Review the exclusions of your MFA policies. Excluded accounts, applications and trusted locations are where a password alone still works.
  • Move applications and test rigs that use the flow to interactive authentication, and background services to service principal authentication.
  • Move users to passwordless methods where possible. An account without a password cannot sign in with this flow.
  • Do not enable direct ROPC authentication of federated users in a home realm discovery policy unless a legacy application needs it.

Frequently asked questions

What does a successful ROPC sign-in prove?

That a password alone was enough for that account and resource. The flow is incompatible with MFA, and a user who has to complete MFA is blocked instead of prompted. A success therefore shows that no MFA requirement applied, for example because of an exclusion in Conditional Access.

Can federated users sign in with this flow?

Not by default. The flow needs an account whose password Microsoft Entra ID can validate, which means a cloud-only account, password hash synchronization or pass-through authentication. Federated users are supported only if the tenant has enabled direct password validation for them in a home realm discovery policy.

When is ROPC legitimate?

Microsoft recommends not using the flow and says it should only be used in automated testing of applications, if at all. In practice the rule also meets legacy line-of-business applications and scripts that sign in with a user name and password. Make an inventory of them and filter by AppId or UserPrincipalName until they are migrated.

Is one log enough to see every ROPC sign-in?

No. The rule reads the interactive sign-in log, and the non-interactive user sign-in log has the same AuthenticationProtocol column. Run the same filter there for full coverage. In Microsoft Sentinel that is the AADNonInteractiveUserSignInLogs table.

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.