forked from reprise99/Sentinel-Queries
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
Azure Active Directory/Audit-MultipleUsersSameMFANumber.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//Query your Azure Active Directory audit logs for any phone numbers that have been registered to multiple users for MFA | ||
|
||
//Data connector required for this query - Azure Active Directory - Audit Logs | ||
|
||
AuditLogs | ||
| where TimeGenerated > ago (30d) | ||
| where Result == "success" | ||
| where Identity == "Azure Credential Configuration Endpoint Service" | ||
| where OperationName == "Update user" | ||
| extend UserPrincipalName = tostring(TargetResources[0].userPrincipalName) | ||
| extend PhoneNumber = tostring(parse_json(tostring(parse_json(tostring(TargetResources[0].modifiedProperties))[1].newValue))[0].PhoneNumber) | ||
| where isnotempty(PhoneNumber) | ||
| summarize Users=make_set(UserPrincipalName) by PhoneNumber | ||
| extend CountofUsers=array_length(Users) | ||
| where CountofUsers > 1 |