Microsoft Xdr Auditing
In brief
The page broadens references from Microsoft Defender XDR to Microsoft Defender, clarifies that audit logs can be searched in the Defender or Purview portals, updates navigation and retention guidance, and removes the PowerShell query example.
What Defender admins need to know
Admins can use the revised portal instructions and links when investigating audited activities; no required configuration change is stated.
Summaries are generated from the documentation change itself.
Documentation change
The comparison below shows only the changed extract. Use the full-page view for complete context.
- m365-security
- tier3
ms.topic: how-to
ms.date:
06/15/07/02/2026 appliesto: - Microsoft Defender for Endpoint Plan 2
- Microsoft Defender XDR
ms.custom: sfi-ga-nochange, msecd-doc-authoring-
10141016 ai-usage: ai-assisted
#customer intent: As a SOC analyst, I want to learn how to use the audit log to search for Microsoft Defender XDR activities to help with investigation.
[!INCLUDE Microsoft Defender XDR rebranding]
The audit log helps you investigate specific activities across Microsoft 365 services. In the Microsoft Defender portal, Microsoft Defender XDR and Microsoft Defender for Endpoint activities are audited.
Some of the audited activities audited are:include:
- Changes to data retention settings
- Changes to advanced features
- Create\edit custom detection rules
- Assign user to an incidents
For a complete list of Microsoft Defender XDR activities that are audited, see Microsoft Defender activities and Microsoft Defender for Endpoint activities.
Auditing is automatically turned on for Microsoft Defender XDR.Defender. Features that are audited are logged in the audit log automatically. Auditing can also collect audit logs from GCC environments.
Prerequisites
Microsoft Defender uses the Microsoft Purview auditing solution. Before you can look at the audit data in the Microsoft Defender portal, you need to turn on auditing in the Microsoft Purview portal. For more information, see Turn auditing on or off.
Search the audit log
You can search the audit log from the Microsoft Defender portal or the Microsoft Purview compliance portal. For detailed compliance portal instructions, see Search the audit log in the compliance portal or go. Audit log record retention is based on Microsoft Purview retention policies. For more information, see Manage audit log retention policies.
Follow these steps to search the audit log:
Go to the Microsoft Defender portal's Audit page. You can also open the Purview compliance portal and select Audit.
:::image type="content" source="media/microsoft-xdr-auditing/unified-audit-log-xdr.png" alt-text="Screenshot of the unified audit log page in Microsoft Defender XDR " lightbox="media/microsoft-xdr-auditing/unified-audit-log-xdr.png":::
For step-by-step instructions, see Search the audit log in the compliance portal.
AuditHow long audit log record retention is basedrecords are kept depends on your Microsoft Purview retention policies. For more information,To learn more, see Manage audit log retention policies.
Microsoft Defender XDR audit log activity reference
For a list of all events that are logged for user and admin activities in Microsoft Defender XDR in the Microsoft 365 audit log, see:
- Custom detection activities in Microsoft Defender in the audit log
- Incident activities in Microsoft Defender in the audit log
- Suppression rule activities in Microsoft Defender in the audit log
Microsoft Defender for Endpoint audit log activity reference
For a list of all events that are logged forThe Microsoft 365 audit log records user and admin activities in Microsoft Defender for Endpoint in the Microsoft 365 audit log,Endpoint. For details, see:
- General settings activities in Defender for Endpoint in the audit log
- Indicator settings activities in Defender for Endpoint in the audit log
Search for events using a PowerShell script
You can use the following PowerShell code snippet to query the Office 365 Management API to retrieve information aboutfor Microsoft Defender XDR events. The script connects to Exchange Online PowerShell, establishes a remote session, and then searches the unified audit log for thea specified record type and date range.
$cred = Get-Credential
For more information, see [Use a PowerShell script to search the audit log](/purview/audit-log-search-script)
<a name="see-also"></a>
## See alsoRelated content
- [Detailed properties in the audit log](/purview/audit-log-detailed-properties)
- [Export, configure, and view audit log records](/purview/audit-log-export-records)
@@ -9,11 +9,11 @@ ms.collection: - m365-security - tier3 ms.topic: how-to-ms.date: 06/15/2026+ms.date: 07/02/2026 appliesto: - Microsoft Defender for Endpoint Plan 2 - Microsoft Defender XDR-ms.custom: sfi-ga-nochange, msecd-doc-authoring-1014+ms.custom: sfi-ga-nochange, msecd-doc-authoring-1016 ai-usage: ai-assisted #customer intent: As a SOC analyst, I want to learn how to use the audit log to search for Microsoft Defender XDR activities to help with investigation.@@ -23,7 +23,9 @@ ai-usage: ai-assisted [!INCLUDE [Microsoft Defender XDR rebranding](../includes/microsoft-defender.md)] -The audit log helps you investigate specific activities across Microsoft 365 services. In the Microsoft Defender portal, Microsoft Defender XDR and Microsoft Defender for Endpoint activities are audited. Some of the activities audited are:+The audit log helps you investigate specific activities across Microsoft 365 services. In the Microsoft Defender portal, Microsoft Defender XDR and Microsoft Defender for Endpoint activities are audited.++Some of the audited activities include: - Changes to data retention settings - Changes to advanced features@@ -33,9 +35,9 @@ The audit log helps you investigate specific activities across Microsoft 365 ser - Create\edit custom detection rules - Assign user to an incidents -For a complete list of Microsoft Defender XDR activities that are audited, see [Microsoft Defender XDR activities](#microsoft-defender-xdr-activities) and [Microsoft Defender for Endpoint activities](#microsoft-defender-for-endpoint-activities).+For a complete list of Microsoft Defender activities that are audited, see [Microsoft Defender activities](#microsoft-defender-xdr-activities) and [Microsoft Defender for Endpoint activities](#microsoft-defender-for-endpoint-activities). -Auditing is automatically turned on for Microsoft Defender XDR. Features that are audited are logged in the audit log automatically. Auditing can also collect audit logs from GCC environments.+Auditing is automatically turned on for Microsoft Defender. Features that are audited are logged in the audit log automatically. Auditing can also collect audit logs from GCC environments. ## Prerequisites @@ -44,16 +46,18 @@ To access the audit log, you need to have the **View-Only Audit Logs** or **Audi > [!NOTE] > Global administrators in Office 365 and Microsoft 365 are automatically added as members of the Organization Management role group in Exchange Online. -Microsoft Defender XDR uses the [Microsoft Purview auditing solution](/purview/audit-solutions-overview). Before you can look at the audit data in the Microsoft Defender portal, you need to turn on auditing in the Microsoft Purview portal. For more information, see [Turn auditing on or off](/purview/audit-log-enable-disable).+Microsoft Defender uses the [Microsoft Purview auditing solution](/purview/audit-solutions-overview). Before you can look at the audit data in the Microsoft Defender portal, you need to turn on auditing in the Microsoft Purview portal. For more information, see [Turn auditing on or off](/purview/audit-log-enable-disable). > [!IMPORTANT] > Global Administrator is a highly privileged role that should be limited to scenarios when you can't use an existing role. Microsoft recommends that you use roles with the fewest permissions. Using accounts with lower permissions helps improve security for your organization. ## Search the audit log +You can search the audit log from the Microsoft Defender portal or the Microsoft Purview compliance portal. For detailed compliance portal instructions, see [Search the audit log in the compliance portal](/purview/audit-new-search). Audit log record retention is based on Microsoft Purview retention policies. For more information, see [Manage audit log retention policies](/purview/audit-log-retention-policies).+ Follow these steps to search the audit log: -1. Navigate to the [Microsoft Defender portal's Audit page](https://security.microsoft.com/auditlogsearch) or go to the [Purview compliance portal](https://purview.microsoft.com) and select **Audit**.+1. Go to the [Microsoft Defender portal's Audit page](https://security.microsoft.com/auditlogsearch). You can also open the [Purview compliance portal](https://purview.microsoft.com) and select **Audit**. :::image type="content" source="media/microsoft-xdr-auditing/unified-audit-log-xdr.png" alt-text="Screenshot of the unified audit log page in Microsoft Defender XDR " lightbox="media/microsoft-xdr-auditing/unified-audit-log-xdr.png"::: @@ -66,21 +70,21 @@ Follow these steps to search the audit log: For step-by-step instructions, see [Search the audit log in the compliance portal](/purview/audit-new-search). -Audit log record retention is based on Microsoft Purview retention policies. For more information, see [Manage audit log retention policies](/purview/audit-log-retention-policies).+How long audit log records are kept depends on your Microsoft Purview retention policies. To learn more, see [Manage audit log retention policies](/purview/audit-log-retention-policies). <a name="microsoft-defender-xdr-activities"></a> ## Microsoft Defender XDR audit log activity reference -For a list of all events that are logged for user and admin activities in Microsoft Defender XDR in the Microsoft 365 audit log, see:+For a list of all events that are logged for user and admin activities in Microsoft Defender in the Microsoft 365 audit log, see: -- [Custom detection activities in Microsoft Defender XDR in the audit log](/purview/audit-log-activities#microsoft-defender-xdr-custom-detection-activities)-- [Incident activities in Microsoft Defender XDR in the audit log](/purview/audit-log-activities#microsoft-defender-xdr-custom-detection-activities)-- [Suppression rule activities in Microsoft Defender XDR in the audit log](/purview/audit-log-activities#microsoft-defender-xdr-suppression-rule-activities)+- [Custom detection activities in Microsoft Defender in the audit log](/purview/audit-log-activities#microsoft-defender-xdr-custom-detection-activities)+- [Incident activities in Microsoft Defender in the audit log](/purview/audit-log-activities#microsoft-defender-xdr-custom-detection-activities)+- [Suppression rule activities in Microsoft Defender in the audit log](/purview/audit-log-activities#microsoft-defender-xdr-suppression-rule-activities) <a name="microsoft-defender-for-endpoint-activities"></a> ## Microsoft Defender for Endpoint audit log activity reference -For a list of all events that are logged for user and admin activities in Microsoft Defender for Endpoint in the Microsoft 365 audit log, see:+The Microsoft 365 audit log records user and admin activities in Defender for Endpoint. For details, see: - [General settings activities in Defender for Endpoint in the audit log](/purview/audit-log-activities#microsoft-defender-for-endpoint-general-settings-activities) - [Indicator settings activities in Defender for Endpoint in the audit log](/purview/audit-log-activities#microsoft-defender-for-endpoint-indicator-settings-activities)@@ -89,7 +93,10 @@ For a list of all events that are logged for user and admin activities in Micros ## Search for events using a PowerShell script -You can use the following PowerShell code snippet to query the Office 365 Management API to retrieve information about Microsoft Defender XDR events. The script connects to Exchange Online PowerShell, establishes a remote session, and then searches the unified audit log for the specified record type and date range.+You can use the following PowerShell code snippet to query the Office 365 Management API for Microsoft Defender XDR events. The script connects to Exchange Online PowerShell, establishes a remote session, and then searches the unified audit log for a specified record type and date range.++> [!NOTE]+> Before you run this script, identify the record type value you need. See the API column in [Audit log activities](/purview/audit-log-activities) for the record type values. ```PowerShell $cred = Get-Credential@@ -103,7 +110,8 @@ Search-UnifiedAuditLog -StartDate 2023/03/12 -EndDate 2023/03/20 -RecordType <ID For more information, see [Use a PowerShell script to search the audit log](/purview/audit-log-search-script) -## See also+<a name="see-also"></a>+## Related content - [Detailed properties in the audit log](/purview/audit-log-detailed-properties) - [Export, configure, and view audit log records](/purview/audit-log-export-records) 