Query Details
# Summary Rules - Entra Assigned Roles Report ## Query Information #### Description This summary rule focusses on the assigned roles of users. The results of the summary rule can again be used to get insights into specific users, to for example see if their roles increase or decrease overtime. These results can also serve as input for reporting on role assignments. **Recommended Schedule:** 24 hours. **Recommended Delay:** 60 minutes. #### References - https://learn.microsoft.com/en-us/azure/sentinel/summary-rules ## Sentinel ```KQL IdentityInfo | summarize arg_max(TimeGenerated, *) by AccountObjectId | mv-expand AssignedRoles | where isnotempty(AssignedRoles) | summarize TotalRoles = dcount(tostring(AssignedRoles)), Roles = make_set(tostring(AssignedRoles), 100) by AccountObjectId, AccountDisplayName, AccountUPN | extend ReportDate = now() ```
This query is designed to generate a report on the roles assigned to users in an Entra (Azure AD) environment. Here's a simplified summary:
IdentityInfo table.AccountObjectId.TotalRoles) and compiles a list of these roles (Roles) for each user.AccountObjectId), display name (AccountDisplayName), and user principal name (AccountUPN).ReportDate.Usage: This report can be used to track changes in user roles over time and for generating role assignment reports.
Recommended Execution: Run this query every 24 hours with a delay of 60 minutes to ensure data freshness.
Reference: For more details, you can refer to the Azure Sentinel summary rules documentation.

Bert-Jan Pals
Released: September 9, 2024
Tables
Keywords
Operators