View audit report for Azure resource roles in Privileged Identity Management (PIM)
In brief
The documentation explains that related PIM operations can have different CorrelationId values and recommends using roleAssignmentRequestId to correlate events across activation and deactivation cycles. It adds Log Analytics query examples.
What Entra admins need to know
Administrators investigating PIM audit activity can use roleAssignmentRequestId to trace complete activation and deactivation workflows, including scheduled and approval-based activations.
This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.
Documentation change
The comparison below shows only the changed extract. Use the full-page view for complete context.
title: View audit report for Azure resource roles in Privileged Identity Management (PIM)
description: View activity and audit history for Azure resource roles in Privileged Identity Management (PIM).
ms.topic: how-to
ms.date: 11/17/25/2026
ms.reviewer: ilyal
ms.custom: sfi-image-nochange, msecd-doc-authoring-10321018
#Customer Intent: As an administrator, I want to view activity and audit history for Azure resource roles to monitor privileged access and maintain compliance.
ms.author: tamimsangrar
ai-usage: ai-assisted
Typically, the log event immediately above the approval event is an event for Add member to role completed where the Initiated by (actor) is the requester. In most cases, you won't need to find the requester in the approval request from an auditing perspective.
Correlate events related to the same activation cycle
CorrelationId is generally used to correlate audit log events related to one request. With PIM, multiple asynchronously processed operations can be part of one activation/deactivation cycle. As a result, some events related to the same activation/deactivation cycle will have different CorrelationIds.
Correlate activation events
During role activation, the following operations might be processed asynchronously, resulting in multiple CorrelationIds being generated:
Scheduled activation: Eligible users can schedule role activation for a future time. PIM tracks the request and automatically creates the role assignment at the scheduled time without further user input. This asynchronous operation generates a new
CorrelationIdat activation, which might differ from the original request'sCorrelationId. This makes correlating the request and activation byCorrelationIddifficult.Approval-gated activation: When PIM policy requires approval, an eligible user creates an activation request, and a designated approver approves it. PIM then assigns the role immediately or at the user's scheduled start time. Because this flow is asynchronous, the
CorrelationIdmight differ across stages.In rare cases,
CorrelationIdmight change during the role activation flow due to the way requests are processed between systems.
Use roleAssignmentRequestId to correlate events related to one activation request in these scenarios. roleAssignmentRequestId remains the same during the asynchronous processing of operations such as scheduled activation or approval.
Use the following example Log Analytics query to get audit log entries related to role activation:
AuditLogs
| where OperationName has "Add member to role"
Use the output of this query to get the roleAssignmentRequestId for the event you need to analyze.
Use the following example Log Analytics query to get audit log entries related to the same role activation:
let roleAssignmentRequestId = "{roleAssignmentRequestId}";
AuditLogs
| where AdditionalDetails has roleAssignmentRequestId
Correlate deactivation events
CorrelationId logged during the deactivation process depends on how deactivation was triggered:
- When deactivation is triggered automatically based on the expiration of an activated role assignment,
CorrelationIdof deactivation events matches the latestCorrelationIdused during the activation. - When deactivation is triggered by the assignee (user selected Deactivate on the portal),
CorrelationIdwill be different from the one used in the activation flow.
In both cases, roleAssignmentRequestId of the original activation request is logged under Additional details for audit log events of deactivation.
Use the following example Log Analytics query to get audit log entries related to the full activation/deactivation cycle:
let roleAssignmentRequestId = "{roleAssignmentRequestId}";
let relatedCorrelationIds = AuditLogs
| where AdditionalDetails has roleAssignmentRequestId
| summarize makeset(CorrelationId);
AuditLogs
| where AdditionalDetails has roleAssignmentRequestId
or CorrelationId in (relatedCorrelationIds)
@@ -2,9 +2,9 @@ title: View audit report for Azure resource roles in Privileged Identity Management (PIM) description: View activity and audit history for Azure resource roles in Privileged Identity Management (PIM). ms.topic: how-to-ms.date: 11/17/2026+ms.date: 11/25/2026 ms.reviewer: ilyal-ms.custom: sfi-image-nochange, msecd-doc-authoring-1032+ms.custom: sfi-image-nochange, msecd-doc-authoring-1018 #Customer Intent: As an administrator, I want to view activity and audit history for Azure resource roles to monitor privileged access and maintain compliance. ms.author: tamimsangrar ai-usage: ai-assisted@@ -131,6 +131,60 @@ My audit enables you to view your personal role activity. Typically, the log event immediately above the approval event is an event for **Add member to role completed** where the **Initiated by (actor)** is the requester. In most cases, you won't need to find the requester in the approval request from an auditing perspective. +## Correlate events related to the same activation cycle++`CorrelationId` is generally used to correlate audit log events related to one request. With PIM, multiple asynchronously processed operations can be part of one activation/deactivation cycle. As a result, some events related to the same activation/deactivation cycle will have different `CorrelationId`s.++### Correlate activation events++During role activation, the following operations might be processed asynchronously, resulting in multiple `CorrelationId`s being generated:++- **Scheduled activation**: Eligible users can schedule role activation for a future time. PIM tracks the request and automatically creates the role assignment at the scheduled time without further user input. This asynchronous operation generates a new `CorrelationId` at activation, which might differ from the original request's `CorrelationId`. This makes correlating the request and activation by `CorrelationId` difficult.++- **Approval-gated activation**: When PIM policy requires approval, an eligible user creates an activation request, and a designated approver approves it. PIM then assigns the role immediately or at the user's scheduled start time. Because this flow is asynchronous, the `CorrelationId` might differ across stages.++- In rare cases, `CorrelationId` might change during the role activation flow due to the way requests are processed between systems.++Use `roleAssignmentRequestId` to correlate events related to one activation request in these scenarios. `roleAssignmentRequestId` remains the same during the asynchronous processing of operations such as scheduled activation or approval.++Use the following example Log Analytics query to get audit log entries related to role activation:++```Kusto+AuditLogs+| where OperationName has "Add member to role"+```++Use the output of this query to get the `roleAssignmentRequestId` for the event you need to analyze.++Use the following example Log Analytics query to get audit log entries related to the same role activation:++```Kusto+let roleAssignmentRequestId = "{roleAssignmentRequestId}";+AuditLogs+| where AdditionalDetails has roleAssignmentRequestId+```++### Correlate deactivation events++`CorrelationId` logged during the deactivation process depends on how deactivation was triggered:++- When deactivation is triggered automatically based on the expiration of an activated role assignment, `CorrelationId` of deactivation events matches the latest `CorrelationId` used during the activation.+- When deactivation is triggered by the assignee (user selected **Deactivate** on the portal), `CorrelationId` will be different from the one used in the activation flow.++In both cases, `roleAssignmentRequestId` of the original activation request is logged under **Additional details** for audit log events of deactivation.++Use the following example Log Analytics query to get audit log entries related to the full activation/deactivation cycle:++```Kusto+let roleAssignmentRequestId = "{roleAssignmentRequestId}";+let relatedCorrelationIds = AuditLogs+ | where AdditionalDetails has roleAssignmentRequestId+ | summarize makeset(CorrelationId);+AuditLogs+| where AdditionalDetails has roleAssignmentRequestId+ or CorrelationId in (relatedCorrelationIds)+```+ <a name="review-session-activity"></a> <a name="review-session-activity-preview"></a> 