1. Resources
  2. Detection rules
  3. Directory Enumeration Through Bulk Export

Directory Enumeration Through Bulk Export detection rules

An attacker in a compromised account downloads the full list of users, groups, role assignments, service principals or devices from the Microsoft Entra admin center to choose the next targets.

Platform
Microsoft Entra ID
Severity
Medium
Log source
Microsoft Entra ID audit logs, Microsoft Graph activity logs, Microsoft Entra ID Protection risk detections
Last updated
Tactic
Discovery
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
A session as any member of the tenant, because member users can enumerate users, groups, applications and devices by default.
Impact
A complete offline copy of the directory that names the administrators, the groups that lead to them and the accounts without strong authentication.
Response
Revoke the sessions of the account, reset its credentials, and treat the exported user names and administrator accounts as known to the attacker.
Mitigation
Keep guest access restricted, give reader roles only to the people who need them, and require MFA and compliant devices for the admin portals.
Audit activities
Download users - finished (bulk)Download groups - finished (bulk)Download group members - finished (bulk)Download service principals - finished (bulk)Download devices - finished (bulk)Download role assignments - finished (bulk)Download user registration details - finished (bulk)
Risk detection type
suspiciousAPITraffic

How the attack works

After the first account is taken, an attacker needs a map of the tenant: who the administrators are, which groups give access, which accounts have no MFA and which applications hold permissions. In Microsoft Entra ID an ordinary member account can read most of that. Microsoft documents that member users can enumerate the list of all users, groups, applications and devices, and the admin center offers the lists as a download: both administrators and standard users can download the user list, and all admins and nonadmin users can download the group list, as a CSV file.

Reading the directory through the portal pages or through Microsoft Graph changes nothing and is not written to the audit log, which records changes. The bulk downloads of the admin center are the exception. Each finished download is written as an audit activity of its own, such as Download users - finished (bulk) or Download role assignments - finished (bulk), with the account that asked for it. The rules on this page read those activities. Two of the lists are rated higher than the rest: the role assignments name the administrators, and the user registration details show which methods each account has registered.

A third rule reads the ID Protection risk detection "Suspicious API traffic", which Microsoft raises when abnormal Graph API traffic or directory enumeration is observed for a user. It needs Microsoft Entra ID P2. Enumeration that stays below Microsoft's own detection and does not use the bulk download leaves no trace in the audit log. The Microsoft Graph activity log records those requests, and three threshold rules on this page read it. Two count the successful directory reads of one user or one service principal, and one counts the requests that were refused with status 401 or 403.

What an attacker needs

  • A session as any member of the tenant. Guests cannot enumerate the list of all users and groups by default, unless guest access was widened.
  • For role assignments, service principals and registration details, an account that can open those lists in the admin center.

Impact

A complete, offline copy of the directory: every user name for password spraying and phishing, the administrators and the groups that lead to them, the accounts without strong authentication and the applications worth taking over. Nothing in the tenant changes, so the export goes unnoticed unless the download is watched.

Detection rules

Directory List Downloaded in Bulk From the Admin Center

Detects a finished bulk download of a directory list from the Microsoft Entra admin center: users, groups, group members, service principals or devices. Microsoft lists these activities for the admin center in its audit activity reference and documents their names only. Reading the directory is otherwise not written to the audit log, so these events are the one place where the audit log shows a full export. Microsoft's documentation says that both administrators and standard users can download user lists and group lists, which means a compromised member account is enough. The export is routine for help desk, identity and audit staff, so the rule is rated low: alert on actors outside those teams. The actor is in InitiatedBy.

LevelLowStatusExperimentalLog sourceMicrosoft Entra ID audit logs
title: Directory List Downloaded in Bulk From the Admin Center
id: 9d883423-9a1c-4b4a-a846-4b0ff7765a50
status: experimental
description: >-
  Detects a finished bulk download of a directory list from the Microsoft
  Entra admin center: users, groups, group members, service principals or
  devices. Microsoft lists these activities for the admin center in its audit
  activity reference and documents their names only. Reading the directory is
  otherwise not written to the audit log, so these events are the one place
  where the audit log shows a full export. Microsoft's documentation says that
  both administrators and standard users can download user lists and group
  lists, which means a compromised member account is enough. The export is
  routine for help desk, identity and audit staff, so the rule is rated low:
  alert on actors outside those teams. The actor is in InitiatedBy.
references:
  - https://learn.microsoft.com/en-us/entra/identity/monitoring-health/reference-audit-activities
  - https://learn.microsoft.com/en-us/entra/identity/users/users-bulk-download
  - https://learn.microsoft.com/en-us/entra/identity/users/groups-bulk-download
  - https://attack.mitre.org/techniques/T1087/004/
  - https://attack.mitre.org/techniques/T1069/003/
author: Forestall
date: 2026-11-18
tags:
  - attack.discovery
  - attack.t1087.004
  - attack.t1069.003
logsource:
  product: azure
  service: auditlogs
detection:
  selection:
    OperationName:
      - Download users - finished (bulk)
      - Download groups - finished (bulk)
      - Download group members - finished (bulk)
      - Download service principals - finished (bulk)
      - Download devices - finished (bulk)
  condition: selection
falsepositives:
  - Help desk, identity, licensing and audit staff who export lists for their work, and managers who download the members of their own groups. Build a list of the usual actors and alert on everyone else.
level: low

False positives

  • Help desk, identity, licensing and audit staff who export lists for their work, and managers who download the members of their own groups. Build a list of the usual actors and alert on everyone else.

One Service Principal Read the Directory Through Microsoft Graph in a Burst

Counts, per service principal, the successful GET requests to directory resources of Microsoft Graph that carry no user identity. An application that holds a directory read permission can list every user, group, role assignment and application of the tenant with its own credential, and none of it reaches the audit log. The Microsoft Graph activity log records the requests with the caller in ServicePrincipalId and AppId. The rule fires at 1000 or more requests by one service principal within 10 minutes. Many legitimate applications read the directory at that rate every day, such as synchronization, governance and security tools, so the rule is rated low and is useful only after the known readers are excluded. What remains is an application that never read the directory in bulk before. Microsoft publishes no threshold for this, so both values are starting points. The rule treats a request without UserId as made with the application's own identity. Microsoft documents the two columns, and not this distinction, so check it against your own events.

Fires when one ServicePrincipalId has at least 1000 matching events within 10 minutes.

Threshold ruleLevelLowStatusExperimentalLog sourceMicrosoft Graph activity logs
title: Successful Directory Read Through Microsoft Graph by a Service Principal (Threshold Base Event)
id: 0af89460-febc-4550-9211-af7ae052dff7
name: graph_directory_read_by_service_principal
status: experimental
description: >-
  Base event of the threshold rule in this file. A GET request without a user
  identity, made by a service principal, to a directory resource of Microsoft
  Graph that was answered with status 200. Requests for user content under
  those paths, such as mail, calendar and files, are excluded.
logsource:
  product: azure
  service: graphactivitylogs
detection:
  selection:
    RequestMethod: GET
    ResponseStatusCode: 200
    ServicePrincipalId|exists: true
    RequestUri|contains:
      - /users
      - /groups
      - /servicePrincipals
      - /applications
      - /devices
      - /directoryRoles
      - /roleManagement/directory/
      - /directoryObjects
      - /oauth2PermissionGrants
      - /administrativeUnits
  filter_delegated:
    UserId|exists: true
  filter_user_content:
    RequestUri|contains:
      - /messages
      - /mailFolders
      - /events
      - /calendar
      - /drive
      - /photo
      - /presence
      - /chats
      - /joinedTeams
      - /onenote
      - /todo
      - /contacts
      - /planner
      - /insights
  condition: selection and not 1 of filter_*
level: low
---
title: One Service Principal Read the Directory Through Microsoft Graph in a Burst
id: c829316e-2a4c-4971-a947-7451bd357eee
status: experimental
description: >-
  Counts, per service principal, the successful GET requests to directory
  resources of Microsoft Graph that carry no user identity. An application
  that holds a directory read permission can list every user, group, role
  assignment and application of the tenant with its own credential, and none
  of it reaches the audit log. The Microsoft Graph activity log records the
  requests with the caller in ServicePrincipalId and AppId. The rule fires at
  1000 or more requests by one service principal within 10 minutes. Many
  legitimate applications read the directory at that rate every day, such as
  synchronization, governance and security tools, so the rule is rated low
  and is useful only after the known readers are excluded. What remains is an
  application that never read the directory in bulk before. Microsoft
  publishes no threshold for this, so both values are starting points. The
  rule treats a request without UserId as made with the application's own
  identity. Microsoft documents the two columns, and not this distinction, so
  check it against your own events.
references:
  - https://learn.microsoft.com/en-us/graph/microsoft-graph-activity-logs-overview
  - https://attack.mitre.org/techniques/T1087/004/
  - https://attack.mitre.org/techniques/T1069/003/
author: Forestall
date: 2026-11-18
tags:
  - attack.discovery
  - attack.t1087.004
  - attack.t1069.003
correlation:
  type: event_count
  rules:
    - graph_directory_read_by_service_principal
  group-by:
    - ServicePrincipalId
  timespan: 10m
  condition:
    gte: 1000
falsepositives:
  - Applications whose work is to read the directory, such as identity governance, HR and directory synchronization, backup, inventory and security posture tools. List their service principals and exclude them, then alert on everything else.
  - A new integration during its first full synchronization. Confirm it with the owner of the application.
  - The values of 1000 requests and 10 minutes are starting points, not tested limits.
level: low

False positives

  • Applications whose work is to read the directory, such as identity governance, HR and directory synchronization, backup, inventory and security posture tools. List their service principals and exclude them, then alert on everything else.
  • A new integration during its first full synchronization. Confirm it with the owner of the application.
  • The values of 1000 requests and 10 minutes are starting points, not tested limits.

One User Read the Directory Through Microsoft Graph in a Burst

Counts, per user, the successful GET requests to directory resources of Microsoft Graph. Reading the directory changes nothing and is not written to the audit log. The Microsoft Graph activity log records every HTTP request that Microsoft Graph receives for the tenant, with the user in UserId, the client application in AppId, the address in IPAddress and the request in RequestMethod and RequestUri. Interactive work in a portal produces such requests at the pace of a person. A script that walks the users, groups, applications, service principals and role assignments of the tenant, object by object, produces hundreds within minutes. The rule fires at 500 or more requests by one user within 10 minutes. Microsoft publishes no threshold for this, so both values are starting points to tune against your own traffic. The log needs Microsoft Entra ID P1 or P2 and a diagnostic setting, and Microsoft states that events can take up to 2 hours to arrive.

Fires when one UserId has at least 500 matching events within 10 minutes.

Threshold ruleLevelMediumStatusExperimentalLog sourceMicrosoft Graph activity logs
title: Successful Directory Read Through Microsoft Graph by a User (Threshold Base Event)
id: 97c15ce5-f5c3-4e8a-9b4f-da0a6a89a5e1
name: graph_directory_read_by_user
status: experimental
description: >-
  Base event of the threshold rule in this file. A GET request with a user
  identity to a directory resource of Microsoft Graph (users, groups, service
  principals, applications, devices, directory roles, role management,
  directory objects, permission grants, administrative units) that was
  answered with status 200. Requests for a user's own content under those
  paths, such as mail, calendar, files, photo and presence, are excluded.
logsource:
  product: azure
  service: graphactivitylogs
detection:
  selection:
    RequestMethod: GET
    ResponseStatusCode: 200
    UserId|exists: true
    RequestUri|contains:
      - /users
      - /groups
      - /servicePrincipals
      - /applications
      - /devices
      - /directoryRoles
      - /roleManagement/directory/
      - /directoryObjects
      - /oauth2PermissionGrants
      - /administrativeUnits
  filter_user_content:
    RequestUri|contains:
      - /messages
      - /mailFolders
      - /events
      - /calendar
      - /drive
      - /photo
      - /presence
      - /chats
      - /joinedTeams
      - /onenote
      - /todo
      - /contacts
      - /planner
      - /insights
  condition: selection and not filter_user_content
level: low
---
title: One User Read the Directory Through Microsoft Graph in a Burst
id: 35d1c708-5ad5-4747-8d21-14ec6b44abae
status: experimental
description: >-
  Counts, per user, the successful GET requests to directory resources of
  Microsoft Graph. Reading the directory changes nothing and is not written
  to the audit log. The Microsoft Graph activity log records every HTTP
  request that Microsoft Graph receives for the tenant, with the user in
  UserId, the client application in AppId, the address in IPAddress and the
  request in RequestMethod and RequestUri. Interactive work in a portal
  produces such requests at the pace of a person. A script that walks the
  users, groups, applications, service principals and role assignments of
  the tenant, object by object, produces hundreds within minutes. The rule
  fires at 500 or more requests by one user within 10 minutes. Microsoft
  publishes no threshold for this, so both values are starting points to
  tune against your own traffic. The log needs Microsoft Entra ID P1 or P2
  and a diagnostic setting, and Microsoft states that events can take up to
  2 hours to arrive.
references:
  - https://learn.microsoft.com/en-us/graph/microsoft-graph-activity-logs-overview
  - https://attack.mitre.org/techniques/T1087/004/
  - https://attack.mitre.org/techniques/T1069/003/
author: Forestall
date: 2026-11-18
tags:
  - attack.discovery
  - attack.t1087.004
  - attack.t1069.003
correlation:
  type: event_count
  rules:
    - graph_directory_read_by_user
  group-by:
    - UserId
  timespan: 10m
  condition:
    gte: 500
falsepositives:
  - Administrators who run inventory, reporting or cleanup scripts with their own account through Microsoft Graph PowerShell or another client. Look at AppId and UserAgent in the matching events and exclude the accounts and clients you know.
  - Client applications that look up many colleagues or groups for one user, for example a directory browser or an organization chart. Exclude their AppId if they reach the threshold in normal use.
  - The excluded paths are a starting list. If a client in your tenant reads other user content under these paths in bulk, add its path to the filter.
  - The values of 500 requests and 10 minutes are starting points, not tested limits.
level: medium

False positives

  • Administrators who run inventory, reporting or cleanup scripts with their own account through Microsoft Graph PowerShell or another client. Look at AppId and UserAgent in the matching events and exclude the accounts and clients you know.
  • Client applications that look up many colleagues or groups for one user, for example a directory browser or an organization chart. Exclude their AppId if they reach the threshold in normal use.
  • The excluded paths are a starting list. If a client in your tenant reads other user content under these paths in bulk, add its path to the filter.
  • The values of 500 requests and 10 minutes are starting points, not tested limits.

Burst of Microsoft Graph Requests Refused for One Client Application

Counts, per client application, the Microsoft Graph requests that were refused with status 401 or 403. Somebody who explores a tenant with a stolen token or a newly compromised application does not know what the identity may read, so they ask for many resources and are refused for most of them. Microsoft publishes a sample query for the Microsoft Graph activity log that finds the entities whose requests to groups resources fail due to authorization, by ResponseStatusCode 401 or 403. This rule applies the same condition to all requests and fires at 50 or more refusals for one AppId within 10 minutes. The count is per client application, because every request carries an AppId, while UserId and ServicePrincipalId depend on the kind of token. Read those two columns and IPAddress in the matching events to see who was behind the requests. Microsoft gives no threshold, so both values are starting points.

Fires when one AppId has at least 50 matching events within 10 minutes.

Threshold ruleLevelLowStatusExperimentalLog sourceMicrosoft Graph activity logs
title: Microsoft Graph Request Refused With 401 or 403 (Threshold Base Event)
id: 255619de-63b5-47a0-8656-e46a0480197c
name: graph_request_refused
status: experimental
description: >-
  Base event of the threshold rule in this file. A Microsoft Graph request
  that was answered with HTTP status 401 (unauthorized) or 403 (forbidden).
logsource:
  product: azure
  service: graphactivitylogs
detection:
  selection:
    ResponseStatusCode:
      - 401
      - 403
  condition: selection
level: low
---
title: Burst of Microsoft Graph Requests Refused for One Client Application
id: 60323f7a-bfb1-46d7-bcff-1db0afe6fd8b
status: experimental
description: >-
  Counts, per client application, the Microsoft Graph requests that were
  refused with status 401 or 403. Somebody who explores a tenant with a
  stolen token or a newly compromised application does not know what the
  identity may read, so they ask for many resources and are refused for most
  of them. Microsoft publishes a sample query for the Microsoft Graph
  activity log that finds the entities whose requests to groups resources
  fail due to authorization, by ResponseStatusCode 401 or 403. This rule
  applies the same condition to all requests and fires at 50 or more refusals
  for one AppId within 10 minutes. The count is per client application,
  because every request carries an AppId, while UserId and ServicePrincipalId
  depend on the kind of token. Read those two columns and IPAddress in the
  matching events to see who was behind the requests. Microsoft gives no
  threshold, so both values are starting points.
references:
  - https://learn.microsoft.com/en-us/graph/microsoft-graph-activity-logs-overview
  - https://attack.mitre.org/techniques/T1087/004/
author: Forestall
date: 2026-11-18
tags:
  - attack.discovery
  - attack.t1087.004
correlation:
  type: event_count
  rules:
    - graph_request_refused
  group-by:
    - AppId
  timespan: 10m
  condition:
    gte: 50
falsepositives:
  - An application that lost a permission or was deployed without one keeps asking and keeps being refused, often at a steady rate. Fix the permission or exclude the AppId until it is fixed.
  - Client applications used by many people, in which the refusals of many users add up under one AppId. Give those applications a higher threshold.
  - Expired tokens that a client keeps presenting until it refreshes them.
  - The values of 50 refusals and 10 minutes are starting points, not tested limits.
level: low

False positives

  • An application that lost a permission or was deployed without one keeps asking and keeps being refused, often at a steady rate. Fix the permission or exclude the AppId until it is fixed.
  • Client applications used by many people, in which the refusals of many users add up under one AppId. Give those applications a higher threshold.
  • Expired tokens that a client keeps presenting until it refreshes them.
  • The values of 50 refusals and 10 minutes are starting points, not tested limits.

Role Assignments or User Registration Details Downloaded in Bulk

Detects a finished bulk download of the role assignments or of the user registration details from the Microsoft Entra admin center. Microsoft lists both activities in its audit activity reference and documents their names only. These two lists are the ones an attacker wants most. The role assignments name the administrators of the tenant. The user registration details show which authentication methods each account has registered, and so which accounts are easiest to take. Fewer people have a reason to export them than to export the user list, so the rule is rated higher than the rule for the other lists. The actor is in InitiatedBy.

LevelMediumStatusExperimentalLog sourceMicrosoft Entra ID audit logs
title: Role Assignments or User Registration Details Downloaded in Bulk
id: f0da56f4-9ab9-4c83-b37b-64b02d127e18
status: experimental
description: >-
  Detects a finished bulk download of the role assignments or of the user
  registration details from the Microsoft Entra admin center. Microsoft lists
  both activities in its audit activity reference and documents their names
  only. These two lists are the ones an attacker wants most. The role
  assignments name the administrators of the tenant. The user registration
  details show which authentication methods each account has registered, and
  so which accounts are easiest to take. Fewer people have a reason to export
  them than to export the user list, so the rule is rated higher than the rule
  for the other lists. The actor is in InitiatedBy.
references:
  - https://learn.microsoft.com/en-us/entra/identity/monitoring-health/reference-audit-activities
  - https://learn.microsoft.com/en-us/entra/fundamentals/users-default-permissions
  - https://attack.mitre.org/techniques/T1087/004/
  - https://attack.mitre.org/techniques/T1069/003/
author: Forestall
date: 2026-11-18
tags:
  - attack.discovery
  - attack.t1087.004
  - attack.t1069.003
logsource:
  product: azure
  service: auditlogs
detection:
  selection:
    OperationName:
      - Download role assignments - finished (bulk)
      - Download user registration details - finished (bulk)
  condition: selection
falsepositives:
  - Identity and security staff who review privileged access or prepare an MFA rollout, and auditors who collect evidence. Match the download to that work and to the usual actors.
level: medium

False positives

  • Identity and security staff who review privileged access or prepare an MFA rollout, and auditors who collect evidence. Match the download to that work and to the usual actors.

ID Protection Detected Suspicious API Traffic

Detects the Microsoft Entra ID Protection risk detection "Suspicious API traffic" (riskEventType suspiciousAPITraffic). Microsoft reports it when abnormal Graph API traffic or directory enumeration is observed, and says it might suggest that a user is compromised and conducting reconnaissance in the environment. Reading the directory through Microsoft Graph is not written to the audit log, so without the Microsoft Graph activity log this detection is the only signal for enumeration that does not use the bulk download of the admin center. It is a user risk detection, calculated offline, so it arrives after the activity, and it needs Microsoft Entra ID P2. Risk detections reach a SIEM through the UserRiskEvents diagnostic setting of Microsoft Entra ID.

LevelMediumStatusExperimentalLog sourceMicrosoft Entra ID Protection risk detections
title: ID Protection Detected Suspicious API Traffic
id: 29e7da4e-4064-4b46-a4ee-79adb6d4277b
status: experimental
description: >-
  Detects the Microsoft Entra ID Protection risk detection "Suspicious API
  traffic" (riskEventType suspiciousAPITraffic). Microsoft reports it when
  abnormal Graph API traffic or directory enumeration is observed, and says it
  might suggest that a user is compromised and conducting reconnaissance in
  the environment. Reading the directory through Microsoft Graph is not
  written to the audit log, so without the Microsoft Graph activity log this
  detection is the only signal for enumeration that does not use the bulk
  download of the admin center. It is a user risk detection, calculated offline, so it
  arrives after the activity, and it needs Microsoft Entra ID P2. Risk
  detections reach a SIEM through the UserRiskEvents diagnostic setting of
  Microsoft Entra ID.
references:
  - https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks
  - https://learn.microsoft.com/en-us/entra/id-protection/howto-identity-protection-investigate-risk
  - https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/aaduserriskevents
  - https://attack.mitre.org/techniques/T1087/004/
author: Forestall
date: 2026-11-18
tags:
  - attack.discovery
  - attack.t1087.004
logsource:
  product: azure
  service: riskdetection
detection:
  selection:
    RiskEventType: suspiciousAPITraffic
  condition: selection
falsepositives:
  - None documented by Microsoft. Administrators and scripts that read large parts of the directory for an inventory, a migration or a report may be flagged, so check what the account ran and whether it was planned.
level: medium

False positives

  • None documented by Microsoft. Administrators and scripts that read large parts of the directory for an inventory, a migration or a report may be flagged, so check what the account ran and whether it was planned.

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.

Bulk export by an account shortly after a risky sign-in or a risk detection

Detection hypothesisJoins two logsSequence of events

Exports by staff happen in ordinary sessions. An export in a session that ID Protection rated risky, or by a user with a fresh risk detection, is the first thing an attacker does with a new account. Joining the export to the risk signals of the same account separates the two.

  1. Audit log: a bulk download activity such as Download users - finished (bulk) or Download role assignments - finished (bulk). Take the account from InitiatedBy.
  2. Sign-in log, 24 hours before the download: a sign-in of the same account with RiskLevelDuringSignIn medium or high.
  3. Risk detection log, same 24 hours: any detection for the same UserPrincipalName.
  4. Alert when either the sign-in or the risk detection exists.

EventsDownload users - finished (bulk)Download role assignments - finished (bulk)

LimitsRisk levels and risk detail need Microsoft Entra ID P2, so the join finds nothing in tenants without it. A user who travels may be rated risky and still export a list for work. The 24 hours are a starting point.

First bulk export by an account that has never used the feature

Detection hypothesisNeeds a baseline

In most tenants a small, stable set of people uses the bulk downloads. An account that exports a directory list for the first time, above all the role assignments or the registration details, is either a new duty or a compromised account doing discovery.

  1. Build the list of accounts in InitiatedBy that completed a bulk download in the last 90 days, per activity name.
  2. For each new bulk download activity, check whether its actor is on the list for that activity.
  3. Alert when the actor is new, and raise the priority when the same actor completes several different downloads within an hour.

EventsDownload users - finished (bulk)Download groups - finished (bulk)Download group members - finished (bulk)Download role assignments - finished (bulk)Download service principals - finished (bulk)Download devices - finished (bulk)Download user registration details - finished (bulk)

LimitsNew staff and people who change duties appear as first-time users. The 90 days are a starting point, and the baseline is empty until that much audit history has been collected.

Triage

  • Identify the actor in InitiatedBy and which list was downloaded (the activity name).
  • Ask whether the download fits the person's work. Help desk, identity and audit staff export lists. A sales account that downloads the role assignments does not.
  • Review the sign-in behind the session, such as its IP address, device, risk level and how MFA was satisfied.
  • Look for other discovery by the same account, for example further downloads, or a "Suspicious API traffic" risk detection.
  • If the account is compromised, assume the attacker now has the list and look for what follows, such as password spraying against the exported names.

Response

Once the attack is confirmed:

  1. Revoke the sessions of the account and reset its credentials, and remove authentication methods that were registered during the intrusion.
  2. Establish which lists were exported, and treat the user names, the administrator accounts and the accounts without MFA on them as known to the attacker.
  3. Close the gaps the export reveals before the attacker uses them. Register MFA for the accounts without it and remove role assignments that are no longer needed.
  4. Watch the exported accounts for password spraying, MFA prompts and targeted phishing in the following weeks.
  5. Review what else the account read or changed during the session.

Mitigation

  • Keep guest access restricted, so that guests cannot enumerate users and groups.
  • Give the reader roles that open role assignments and registration details only to the people who need them.
  • Require compliant devices and MFA for the admin portals with Conditional Access, so that a stolen password alone does not open them.
  • Do not rely on the setting that restricts access to the admin portal for non-administrators. Microsoft states that it is not a security measure and that it does not block programmatic access.
  • Collect the Microsoft Graph activity log if you need to see read access to the directory.

Frequently asked questions

Can an ordinary user really download the whole user list?

Yes. Microsoft's documentation says that both administrators and standard users can download user lists from the admin center, and that all admins and nonadmin users can download group lists. Member users can enumerate users, groups, applications and devices by default. Guests cannot enumerate all users and groups unless their access was widened.

Does the audit log show who read the directory through Microsoft Graph or PowerShell?

No. The audit log records changes, and reading the directory changes nothing. The bulk downloads of the admin center are written to it because each download is a job with its own activity. Read requests through Microsoft Graph are recorded in the Microsoft Graph activity log, which has to be collected separately. The threshold rules on this page read it.

Does restricting the admin portal for non-administrators stop the export?

It hides commonly visited pages of the admin center from non-administrators. Microsoft states that the setting is not a security measure and that it does not block programmatic access, so the same data stays readable through Microsoft Graph for any member account.

Why are role assignments and registration details rated higher than the user list?

The user list is exported for many ordinary reasons. The role assignments name the administrators, and the user registration details show which authentication methods each account has registered. An attacker uses the two lists to pick the accounts worth attacking and the ones that are easiest to take.

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.