Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Privileged Identity Management activations and approvals overview query #211

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Author: Expecho
// Display name: Privileged Identity Management activations and approvals
// Description: View Privileged Identity Management role activations and approvals
// Categories: Audit
// Resource types: Microsoft Entra ID
// Topic: Audit

AuditLogs
| where TimeGenerated > ago(30d)
| where LoggedByService == "PIM"
| where OperationName == "Add member to role completed (PIM activation)"
| project
TimeGenerated,
Reason = ResultReason,
Result,
Requestor = Identity,
Category,
Role = tostring(TargetResources[0].displayName),
ResourceName = tostring(TargetResources[3].displayName),
ResourceType = tostring(TargetResources[3].type),
Start = iif(Category == "GroupManagement", todatetime(AdditionalDetails[2].value), todatetime(AdditionalDetails[3].value)),
End = iif(Category == "GroupManagement", todatetime(AdditionalDetails[3].value), todatetime(AdditionalDetails[4].value)),
CorrelationId
| join kind=leftouter (
AuditLogs
| where TimeGenerated > ago(30d)
| where LoggedByService == "PIM"
| where OperationName == "Add member to role request approved (PIM activation)"
| project CorrelationId, Approval = ResultDescription, Approver = Identity, Approved = Result)
on CorrelationId
| distinct TimeGenerated, Requestor, Reason, Approver, Approval, Category, Role, ResourceName, ResourceType, Start, End