Query Details
// This query is too long to be in an Analytics Rule (more than 10.000 characters), so it had to be made a function that can be called by the rule. // You can find the function in the next link. // // https://github.com/ep3p/Sentinel_KQL/blob/main/Functions/Analytics-AzureADRoleAssignments.kql // AzureADRoleAssignments
| summarize count() by RoleName, RoleType, UserPrincipalName | order by count_ desc
This query is used to count the number of Azure Active Directory role assignments based on the role name, role type, and user principal name. The results are then ordered in descending order based on the count. The query is too long to be included in an Analytics Rule, so it has been made into a function that can be called by the rule. The function can be found at the provided GitHub link.

Jose Sebastián Canós
Released: September 7, 2023
Tables
Keywords
Operators