How to Send Azure PIM Logs to Microsoft Defender or Splunk
Question details
The user needs to know how to export Microsoft Entra Privileged Identity Management (PIM) audit logs to external security monitoring tools like Microsoft Defender and Splunk.

- Product
- Azure Privileged Identity Management (PIM)
- Device & OS
- not provided
- Scenario
- Configuring security monitoring and routing directory audit logs from Microsoft Entra ID to a centralized SIEM or workspace.
- Observed behavior
- The user requires guidance on the correct diagnostic settings, Log Analytics workspace integration, or Splunk connectors needed to successfully route PIM logs.
Ensure you have Global Administrator or Security Administrator privileges in your Microsoft Entra ID tenant to configure and modify diagnostic settings.
Configure Diagnostic Settings and Consult Microsoft Q&A
Since exporting Azure PIM logs requires specific Log Analytics or Event Hub configurations, utilizing Microsoft Entra ID Diagnostic Settings and the official Microsoft Q&A community is the best approach.
Exporting Azure PIM logs involves configuring Diagnostic Settings in Microsoft Entra ID. This routes directory audit data to a Log Analytics workspace for Microsoft Defender, or streams it to an Azure Event Hub for ingestion by Splunk.
Log in to the Azure Portal, navigate to 'Microsoft Entra ID', scroll down to the 'Monitoring' section on the left sidebar, and select 'Diagnostic settings'.
Click 'Add diagnostic setting'. Under the 'Categories' section, check the box for 'AuditLogs', as PIM activation events are recorded as directory audit logs.
For Microsoft Defender, select 'Send to Log Analytics workspace' and choose your integrated workspace. For Splunk, select 'Stream to an event hub' and select your configured Event Hub namespace.
If you encounter ingestion issues, post your specific architecture details on Microsoft Q&A under the 'Azure PIM' or 'Microsoft Entra ID' tags, where cloud specialists can provide custom deployment scripts.

Manage Your IT Documentation with WPS Office
While you handle complex Azure security integrations, you need a reliable suite to manage your IT documentation, audit reports, and deployment guides. WPS Office is a lightweight, free alternative to Microsoft Office that perfectly handles all your administrative document needs.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install and Open: Run the installer, follow the on-screen prompts, and open the application to access Writer, Spreadsheets, and Presentation tools.
- 3. Edit IT Documents: Open your existing Microsoft Office (.docx, .xlsx, .pptx) audit reports or network diagrams and start editing seamlessly.

Frequently Asked Questions
Can I send Azure PIM logs directly to Splunk without an Azure Event Hub?
No, typically Microsoft Entra ID audit logs must first be streamed to an Azure Event Hub. Splunk then reads these logs from the Event Hub using the Splunk Add-on for Microsoft Cloud Services.
Which specific log categories contain my PIM activation data?
You need to select the 'AuditLogs' category within the Diagnostic settings. Privileged Identity Management role activations and assignment changes are recorded as part of the directory audit logs.
Why are my PIM logs not appearing in Microsoft Defender?
Ensure that your Log Analytics workspace is correctly connected to Microsoft Defender for Cloud, and verify that you have granted the necessary permissions for Defender to ingest data from that specific workspace.
Do I need a premium Azure license to export PIM logs?
Yes, utilizing Azure PIM features requires Microsoft Entra ID P2 licenses. Additionally, exporting these logs to external workspaces or event hubs may incur Azure data ingestion and storage costs.




