Table of Contents

Get-PnPEntraIDActivityReportDirectoryAudit

SYNOPSIS

Required Permissions

  • Microsoft Graph API: AuditLog.Read.All and Directory.Read.All

Returns the audit logs generated by Entra ID.

SYNTAX

Get-PnPEntraIDActivityReportDirectoryAudit [-Identity <string>] [-Filter <string>] [-Connection <PnPConnection>]

DESCRIPTION

This cmdlet gets the list of audit logs generated by Entra ID. This includes audit logs generated by different services in Entra ID such as user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets) and others.

EXAMPLES

Example 1

Get-PnPEntraIDActivityReportDirectoryAudit

Returns all audit logs generated by Entra ID.

Example 2

Get-PnPEntraIDActivityReportDirectoryAudit -Identity "Directory_c3b82411-5445-4620-aace-6a684a252673_02R72_362975819"

Returns the audit log with specific ID.

Example 3

Get-PnPEntraIDActivityReportDirectoryAudit -Filter "activityDateTime le 2018-01-24"

Returns the audit logs based on filter condition.

PARAMETERS

-Identity

Specify the ID of the audit log.

Type: string
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter

Specify the Filter condition for the audit log report.

Type: string
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: PnPConnection
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Microsoft 365 Patterns and Practices