Users who are still authenticating with SMS and when they used it
List Users Authenticating With SMS MFA
Query
// Lists users authenticating with SMS MFA
SigninLogs
| where AuthenticationRequirement == "multiFactorAuthentication"
| where ResultType == 0
| mv-expand AuthDetails = todynamic(AuthenticationDetails)
| extend ['MFA Method'] = tostring(AuthDetails.authenticationMethod)
| where ['MFA Method'] == "Text message"
| summarize SignInCount=dcount(Id), LastUsed=max(TimeGenerated) by UserPrincipalName
| sort by SignInCount descAbout this query
Users who are still authenticating with SMS and when they used it
Use this to identify users still using SMS for MFA
Explanation
This query is designed to identify users who are still using SMS (text message) as their method for multi-factor authentication (MFA) and to provide information on how frequently and recently they have used it. Here's a breakdown of what the query does:
-
Source Data: It starts by examining the
SigninLogs, which contains records of user sign-ins. -
Filter for MFA: It filters these logs to only include sign-ins that required multi-factor authentication (
AuthenticationRequirement == "multiFactorAuthentication"). -
Successful Sign-ins: It further narrows down the logs to only include successful sign-ins (
ResultType == 0). -
Extract MFA Details: The query expands the
AuthenticationDetailsfield to look into the specific methods used for MFA. -
Identify SMS Usage: It checks if the method used was "Text message" (SMS).
-
Summarize Data: For each user (
UserPrincipalName), it calculates:SignInCount: The number of distinct sign-in attempts using SMS.LastUsed: The most recent time SMS was used for sign-in.
-
Sort Results: Finally, it sorts the users by the number of times they have signed in using SMS, in descending order.
In summary, this query helps identify which users are still using SMS for MFA, how often they use it, and when they last used it.