Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
reprise99 committed Sep 1, 2023
1 parent 795837c commit 779f1ae
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Azure Active Directory/Audit-MultipleUsersSameMFANumber.kql
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

0 comments on commit 779f1ae

Please sign in to comment.