1. Resources
  2. Detection rules
  3. Synchronization Account Used Outside Directory Synchronization

Synchronization Account Used Outside Directory Synchronization detection rules

An attacker who has taken the Microsoft Entra Connect server signs in to the tenant as its synchronization account, from another machine or to another application, to map the directory and reach synchronized accounts.

Platform
Microsoft Entra ID
Severity
High
Log source
Microsoft Entra ID sign-in logs
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft Sentinel
What an attacker needs
Administrative control of a server that runs Microsoft Entra Connect Sync and still authenticates with the synchronization account's user name and password.
Impact
A session as a non-human account without MFA that reads the whole directory and shows which synchronized accounts hold privileged roles.
Response
Block sign-in for the synchronization account, revoke its sessions and treat the synchronization server and the forest behind it as compromised.
Mitigation
Move the synchronization service to application-based authentication and restrict the old account with Conditional Access to the addresses of its server.

How the attack works

Microsoft Entra Connect Sync signs in to Microsoft Entra ID with an account of its own, the Microsoft Entra Connector account. The installation creates it with a long password that does not expire, stores that password on the synchronization server and gives the account the Directory Synchronization Accounts role. Every server, staging servers included, has its own account, and Microsoft's hunting queries find it by the display name "On-Premises Directory Synchronization Service Account". Whoever controls the server can extract the credential and sign in as the account from anywhere, because it is a user account with a password.

Microsoft described this in its report on Storm-0501 of 27 August 2025. After compromising the on-premises environment, the actor used the Directory Synchronization Account to enumerate the users, roles and Azure resources of the tenant, then moved to a second synchronization server that belonged to another tenant and repeated the reconnaissance there. In the same intrusion the actor reset the on-premises password of a synchronized account that held Global Administrator and had no MFA method, and the new password reached the cloud through password hash synchronization.

The account's normal behavior is narrow. Microsoft writes that its activity is typically repetitive, coming from the same IP address to the same application, and names the cloud applications it usually accesses as Microsoft Azure Active Directory Connect, Windows Azure Active Directory and Microsoft Online Syndication Partner Portal. The rules on this page read the sign-in log for the account by its display name. One reports a successful sign-in to any other application, and one reports a sign-in of the account that Conditional Access blocked. Servers that were moved to application-based authentication no longer sign in with this account, which makes a sign-in of an old account more suspicious, not less.

What an attacker needs

  • Administrative control of a server that runs Microsoft Entra Connect Sync, or another way to read the credential it stores.
  • A synchronization server that still authenticates with the Microsoft Entra Connector account (user name and password) instead of application-based authentication.

Impact

A signed-in session as a non-human account that nobody watches and that MFA does not protect. The attacker reads the directory with it, including users, roles and groups, and chooses targets among the synchronized accounts. Microsoft has since restricted the permissions of the Directory Synchronization Accounts role, which limits what the account can change, but the reconnaissance and the control of the synchronization server remain. A synchronized account that holds a privileged role can still be taken over through its on-premises password.

Detection rules

Synchronization Account Sign-In Blocked by Conditional Access

Detects a sign-in of a Microsoft Entra Connect synchronization account that failed with error 53003 (BlockedByConditionalAccess). Microsoft recommends a Conditional Access policy that limits the access of the Directory Synchronization Accounts from untrusted IP addresses to all cloud apps. Conditional Access is enforced after first-factor authentication is completed, so a blocked sign-in means that the correct password of the account was presented from a place the policy does not allow. That password is stored only on the synchronization server. The account is selected by the display name "On-Premises Directory Synchronization Service Account", as in Microsoft's hunting queries for Storm-0501. The rule needs such a policy to exist. Without one the attacker's sign-in succeeds and the other rule on this page applies.

LevelHighStatusExperimentalLog sourceMicrosoft Entra ID sign-in logs
title: Synchronization Account Sign-In Blocked by Conditional Access
id: 566807e3-6b6a-4986-aa7b-293d751735c2
status: experimental
description: >-
  Detects a sign-in of a Microsoft Entra Connect synchronization account that
  failed with error 53003 (BlockedByConditionalAccess). Microsoft recommends
  a Conditional Access policy that limits the access of the Directory
  Synchronization Accounts from untrusted IP addresses to all cloud apps.
  Conditional Access is enforced after first-factor authentication is
  completed, so a blocked sign-in means that the correct password of the
  account was presented from a place the policy does not allow. That password
  is stored only on the synchronization server. The account is selected by
  the display name "On-Premises Directory Synchronization Service Account",
  as in Microsoft's hunting queries for Storm-0501. The rule needs such a
  policy to exist. Without one the attacker's sign-in succeeds and the other
  rule on this page applies.
references:
  - https://www.microsoft.com/en-us/security/blog/2025/08/27/storm-0501s-evolving-techniques-lead-to-cloud-based-ransomware/
  - https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes
  - https://learn.microsoft.com/en-us/entra/identity/conditional-access/overview
  - https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/signinlogs
  - https://attack.mitre.org/techniques/T1078/004/
author: Forestall
date: 2026-11-18
tags:
  - attack.initial-access
  - attack.persistence
  - attack.t1078.004
logsource:
  product: azure
  service: signinlogs
detection:
  selection:
    UserDisplayName|contains: On-Premises Directory Synchronization Service Account
    ResultType: '53003'  # string column: BlockedByConditionalAccess
  condition: selection
falsepositives:
  - A changed egress address of the synchronization server that is not yet in the trusted locations of the policy. Synchronization then fails as well, so the hybrid identity team will know.
  - A Conditional Access policy that blocks the account by mistake after a policy change. Check which policy applied in the event.
level: high

False positives

  • A changed egress address of the synchronization server that is not yet in the trusted locations of the policy. Synchronization then fails as well, so the hybrid identity team will know.
  • A Conditional Access policy that blocks the account by mistake after a policy change. Check which policy applied in the event.

Synchronization Account Signed In to an Application Outside Its Usual Set

Detects a successful sign-in of a Microsoft Entra Connect synchronization account to an application other than the ones the synchronization service uses. Microsoft's report on Storm-0501 selects the account by the display name "On-Premises Directory Synchronization Service Account" and states that the cloud applications it usually accesses are Microsoft Azure Active Directory Connect, Windows Azure Active Directory and Microsoft Online Syndication Partner Portal, and that any deviation is worth investigating. The actor in that report used the account to enumerate users, roles and Azure resources. The rule applies the display name to UserDisplayName and the three names to AppDisplayName, the client application of the sign-in. Microsoft's list does not say whether a name is a client or a resource, so read ResourceDisplayName in the event as well. The rule is written for the interactive sign-in log, where a sign-in of this account is unusual in itself. The normal synchronization traffic is non-interactive.

LevelHighStatusExperimentalLog sourceMicrosoft Entra ID sign-in logs
title: Synchronization Account Signed In to an Application Outside Its Usual Set
id: 2bff8cec-871e-45e3-bd9e-de43d3461f3b
status: experimental
description: >-
  Detects a successful sign-in of a Microsoft Entra Connect synchronization
  account to an application other than the ones the synchronization service
  uses. Microsoft's report on Storm-0501 selects the account by the display
  name "On-Premises Directory Synchronization Service Account" and states
  that the cloud applications it usually accesses are Microsoft Azure Active
  Directory Connect, Windows Azure Active Directory and Microsoft Online
  Syndication Partner Portal, and that any deviation is worth investigating.
  The actor in that report used the account to enumerate users, roles and
  Azure resources. The rule applies the display name to UserDisplayName and
  the three names to AppDisplayName, the client application of the sign-in.
  Microsoft's list does not say whether a name is a client or a resource, so
  read ResourceDisplayName in the event as well. The rule is written for the
  interactive sign-in log, where a sign-in of this account is unusual in
  itself. The normal synchronization traffic is non-interactive.
references:
  - https://www.microsoft.com/en-us/security/blog/2025/08/27/storm-0501s-evolving-techniques-lead-to-cloud-based-ransomware/
  - https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/reference-connect-accounts-permissions
  - https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/signinlogs
  - https://learn.microsoft.com/en-us/defender-for-identity/alerts-xdr
  - https://attack.mitre.org/techniques/T1078/004/
author: Forestall
date: 2026-11-18
tags:
  - attack.initial-access
  - attack.persistence
  - attack.t1078.004
logsource:
  product: azure
  service: signinlogs
detection:
  selection:
    UserDisplayName|contains: On-Premises Directory Synchronization Service Account
    ResultType: '0'  # string column: "0" is success
  filter_sync_applications:
    AppDisplayName:
      - Microsoft Azure Active Directory Connect
      - Windows Azure Active Directory
      - Microsoft Online Syndication Partner Portal
  condition: selection and not filter_sync_applications
falsepositives:
  - An administrator who signs in with the synchronization account by hand, for example to test its password. That is not a supported use of the account, so treat it as a finding even when it is explained.
  - A version of Microsoft Entra Connect whose client application carries another display name. Confirm the name in your own sign-in log and add it to the filter.
level: high

False positives

  • An administrator who signs in with the synchronization account by hand, for example to test its password. That is not a supported use of the account, so treat it as a finding even when it is explained.
  • A version of Microsoft Entra Connect whose client application carries another display name. Confirm the name in your own sign-in log and add it to the filter.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Synchronization account signs in from an address that is not a synchronization server

Detection hypothesisNeeds your own lists

Each synchronization account belongs to one server and signs in from that server's address. Microsoft notes that the activity is typically repetitive and comes from the same IP address. A sign-in of the account from any other address means the credential left the server, even when the application is one the service normally uses.

  1. Keep a list of the public addresses from which your synchronization servers reach Microsoft Entra ID.
  2. Sign-in logs, interactive and non-interactive: take the sign-ins whose UserDisplayName contains On-Premises Directory Synchronization Service Account, with IPAddress, AppDisplayName and ResultType.
  3. Alert when IPAddress is not on the list, for successful and for failed sign-ins.

LimitsThe list has to follow network changes, such as a new egress address or a moved server. Servers that use application-based authentication produce no user sign-ins, so the hypothesis covers only accounts that still sign in with a password. An attacker who works from the synchronization server itself uses the expected address.

Synchronization account writes an audit activity it has not written before

Detection hypothesisNeeds a baselineNeeds your own lists

The synchronization service performs a fixed set of directory changes. Microsoft's report says that new and uncommon activity from the account might indicate interactive use, by someone in the organization or by a threat actor. Comparing what the account does now with what it did before finds that use.

  1. List the synchronization accounts. Microsoft documents how to read the members of the Directory Synchronization Accounts role.
  2. Audit log: collect the OperationName values of the records in which InitiatedBy is one of these accounts over the last 30 days.
  3. Alert when one of the accounts writes an OperationName that is not in its collected set.

LimitsA new version of Microsoft Entra Connect or a newly enabled synchronization feature adds activities and raises the alert once. The 30 days are a starting point. Reading the directory is not written to the audit log, so the reconnaissance itself is not seen here.

Triage

  • Read the application in AppDisplayName and the resource in ResourceDisplayName. A portal, a command line client or a Microsoft Graph client is not something the synchronization service uses.
  • Compare IPAddress with the public addresses of your synchronization servers. Microsoft notes that the account normally signs in from the same address.
  • Find the server the account belongs to. Microsoft documents that the server name is the second part of the user name of the account.
  • Ask the hybrid identity team whether somebody signed in with the account on purpose, for example while troubleshooting. Nobody should.
  • Review what the account did in the audit log around the sign-in, and look for directory reads by the account in the Microsoft Graph activity log if you collect it.
  • Check the synchronization server for signs of compromise, such as new local administrators, unexpected logons and credential dumping alerts.

Response

Once the attack is confirmed:

  1. Block sign-in for the synchronization account and revoke its sessions. Synchronization from that server stops until the account is replaced.
  2. Treat the synchronization server and the Active Directory forest behind it as compromised until the investigation shows otherwise, and isolate the server.
  3. Reset the credential of the account from a clean server, or move the server to application-based authentication. Microsoft documents how to reset the password of the Microsoft Entra Connect account.
  4. Review the synchronized accounts that hold privileged roles. Reset their passwords, check the MFA methods that were registered recently and remove the roles where a cloud-only account can replace them.
  5. Review the audit log for changes the account made outside its normal set of activities, and undo them.
  6. If the organization runs more than one tenant or forest, check their synchronization servers and accounts as well. The actor in Microsoft's report moved from one to the next.

Mitigation

  • Move Microsoft Entra Connect Sync to application-based authentication, which replaces the user name and password of the synchronization account with a certificate, and keep the certificate in a TPM where the server has one. Remove the old synchronization account afterwards, as Microsoft strongly recommends.
  • Restrict the synchronization accounts with a Conditional Access policy that blocks them from all cloud applications unless the sign-in comes from the addresses of the synchronization servers. Microsoft recommends this in its Storm-0501 report.
  • Treat every synchronization server as a Tier 0 system, as Microsoft's prerequisites for Microsoft Entra Connect require, and limit who can log on to it.
  • Do not give privileged cloud roles to accounts synchronized from Active Directory, and require MFA for every privileged account.
  • Remove the synchronization accounts of servers that no longer exist. Microsoft documents how to list the members of the Directory Synchronization Accounts role and delete unused ones.

Frequently asked questions

How do the rules recognize the synchronization account?

By its display name. Microsoft's hunting queries for Storm-0501 select the account with the text "On-Premises Directory Synchronization Service Account" in the display name, and the rules apply the same text to the UserDisplayName column of the sign-in log. An account that was renamed, or a tenant in which the name differs, is not matched, so check the name of your own accounts first.

Do the rules still work after a move to application-based authentication?

They read user sign-ins. With application-based authentication the synchronization service signs in as an application with a certificate, and those sign-ins are in the service principal sign-in log, which the rules do not read. Microsoft states that existing servers are not switched automatically. An old synchronization account that still exists after the move should never sign in, so a match is then a stronger signal.

Why is a sign-in blocked by Conditional Access rated high?

Conditional Access is enforced after the first factor is completed. A blocked sign-in of the synchronization account therefore means that somebody presented its correct password from a place or to an application the policy does not allow. The password exists only on the synchronization server, so the server has to be examined.

Does the interactive sign-in log show the normal synchronization traffic?

Mostly not. The service signs in without a person, and Microsoft Sentinel keeps such sign-ins in the non-interactive user sign-in table. The rules are written for the interactive sign-in log, where a sign-in of this account is unusual in itself. If you also run them over the non-interactive log, the list of the three usual applications keeps the normal traffic out.

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.