Microsoft Entra ID Governance
Governance

View audit report for Azure resource roles in Privileged Identity Management (PIM)

In brief

The documentation now describes preview Session Analytics for viewing PIM role lifecycle and Azure Bastion connection activity, including setup, verification, prerequisites, and viewing roles.

What Entra admins need to know

To use it, administrators need Microsoft Entra ID Governance licensing, configure BastionAuditLogs in a same-tenant Log Analytics workspace, verify collection, and assign the required Azure and Entra roles.

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.

View activity and audit history for Azure resource roles in Privileged Identity Management

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.

View session activity (preview)

Use Session Analytics to view an identity's PIM role lifecycle and Azure Bastion connection activity for a selected Azure subscription or resource group. The view covers role activation, Bastion access to an Azure Virtual Machine, and role deactivation or expiration. It doesn't show Azure resource operations, such as creating a resource group, or commands run inside a virtual machine.

For graphical recordings, use Session Recordings. Recordings have separate setup and viewing requirements.

Session Analytics prerequisites

Microsoft Entra ID Governance licensing is required for Session Analytics in preview. See Microsoft Entra ID Governance licensing fundamentals.

Configure diagnostic settings on each Azure Bastion host you want to monitor to send BastionAuditLogs to a Log Analytics workspace. Use a workspace in the same tenant. Only Azure Bastion audit logs need this routing for Session Analytics. You don't need to route additional PIM log sources to the workspace.

Complete Set up Azure Bastion audit-log collection with the setup roles, then verify Bastion log collection. Use the separate roles listed in View Session Analytics to view the results.

Set up Azure Bastion audit-log collection

Configure the destination for each host before viewing its Bastion connection activity. If log collection is already configured, continue to Verify Bastion log collection.

For setup with an existing Log Analytics workspace, use these recommended roles:

ResourceRecommended roleRole assignment scope
Azure Bastion hostMonitoring ContributorThe Azure Bastion resource.
Existing Log Analytics workspaceMonitoring ContributorThe Log Analytics workspace.

These are sufficient built-in setup recommendations, not minimum permissions. Custom roles can grant narrower permissions. See Monitoring Contributor permissions and Log Analytics workspace permissions.

  1. Create or reuse a Log Analytics workspace in the same tenant. Follow Create a Log Analytics workspace for creation steps and permissions.
  2. For each Azure Bastion host you want to monitor, follow Diagnostic settings in Azure Monitor to configure a setting, for example, SendToLogAnalytics, that sends BastionAuditLogs to the workspace. For the log category and MicrosoftAzureBastionAuditLogs table, see Azure Bastion resource logs.
  3. Before viewing Bastion activity in PIM, verify the host's connection records in the destination workspace.

Verify Bastion log collection

Use the Log Analytics Reader role on the destination Log Analytics workspace to check for Bastion connection records before viewing Bastion activity in PIM.

  1. Sign in to the Azure portal.

  2. After a user connects through a monitored Bastion host, check for that connection's records in the workspace's MicrosoftAzureBastionAuditLogs table. Use _ResourceId to identify the Bastion host, TargetResourceId to identify the virtual machine, and SessionStartTime to check the connection time. For column details, see MicrosoftAzureBastionAuditLogs.

    If the expected record isn't present, verify the host's diagnostic settings, the destination workspace, and the time range you're checking before viewing Bastion activity in PIM.

After verifying log collection, continue to View Session Analytics.

View Session Analytics

To view Session Analytics, you need both of the following:

  • At least the Reports Reader role in Microsoft Entra ID.
  • The Azure resource and Log Analytics workspace viewing roles.

If your directory role assignment is eligible, activate it before viewing Session Analytics. See Microsoft Entra activity-log prerequisites.

The following Azure resource and workspace viewing roles apply at the listed resource scopes. These are separate from the setup roles.

ResourceRoleRole assignment scope
Log Analytics workspaceLog Analytics ReaderThe Log Analytics workspace.
Azure Bastion hostReaderThe Azure Bastion resource.
Azure Virtual MachineReaderThe Azure Virtual Machine resource.
Network interfaceReaderThe Azure Virtual Machine's network interface.
Virtual networkReaderThe relevant virtual network, including a peered virtual network where applicable.
  1. Sign in to the Azure portal.

  2. Open Privileged Identity Management, select Azure resources, and select the Azure subscription or resource group whose activity you want to view.

  3. Under Activity, select Session Analytics (Preview).

  4. Use Date range or search by identity, role, or scope to find the activity you want to view.

    :::image type="content" source="media/azure-pim-resource-rbac/session-analytics-activity.png" alt-text="Screenshot of Session Analytics showing a role activation with its scope, start and end times, and filtering controls." lightbox="media/azure-pim-resource-rbac/session-analytics-activity.png":::

  5. View the identity, activated role, scope, scope type, and start and end times. Select Refresh to reload the results.

View Azure Bastion session recordings (preview)

Use Session Recordings to find recording-enabled Azure Bastion hosts in the selected scope and open their graphical recordings.

Session Recordings prerequisites

Azure Bastion recording support

A recording-enabled Azure Bastion Premium host records RDP and SSH connections through that host. It records all connections through the host, not just connections initiated from My Access. The following table summarizes supported and unsupported connection combinations for graphical recording:

ProtocolAuthenticationClientGraphical recording
SSHMicrosoft Entra ID or other supported SSH authentication.Azure portal (browser).Supported.
RDPSupported authentication other than Microsoft Entra ID.Azure portal (browser).Supported.
RDPMicrosoft Entra ID.Azure portal (browser).Not supported concurrently with Microsoft Entra ID RDP.
RDP or SSHAny authentication method.Native client.Not supported.

Use this table when selecting a connection method for a recording requirement. For recording setup and considerations, see Record Bastion sessions. For Microsoft Entra connection requirements, see Configure Microsoft Entra ID authentication for Azure Bastion.

Session Recordings (Preview)

After recording setup is complete, use the PIM view to locate the host and open its recordings.

  1. Sign in to the Azure portal.

  2. Open Privileged Identity Management and select Azure resources. Use the scope selector to select the subscription or resource group that contains the Azure Bastion host whose recordings you want to view.

  3. Under Activity, select Session Recordings (Preview).

    :::image type="content" source="media/azure-pim-resource-rbac/session-recordings-hosts.png" alt-text="Screenshot of Session Recordings listing Azure Bastion hosts with recording enabled." lightbox="media/azure-pim-resource-rbac/session-recordings-hosts.png":::

  4. Select a Bastion host to open its recordings in the Bastion experience.

Next steps

Daily Entra.News

Get daily email updates

Get a concise summary of the latest Microsoft Entra updates delivered straight to your inbox.

Loading the secure signup form…