Filip Kasaj

Reconciled action with the stream of life.

User Tools

Site Tools


technet:graph:preferredauthmethods

This is an old revision of the document!


Reporting User-Preferred MFA Methods for Azure AD User Accounts

Connect-MgGraph -Scopes UserAuthenticationMethod.ReadWrite.All Select-MgProfile Beta [array]$Users = Get-MgUser -Filter “assignedLicenses/`$count ne 0 and userType eq 'Member'” -ConsistencyLevel eventual -CountVariable Records -All $Report = [System.Collections.Generic.List[Object]]::new() ForEach ($User in $Users) { $Uri = (“https://graph.microsoft.com/beta/users/{0}/authentication/signInPreferences” -f $User.Id) $AuthData = Invoke-MgGraphRequest -Uri $Uri -Method Get $ReportLine = [PSCustomObject]@{

  User   = $User.displayName
  UPN    = $User.userPrincipalName
  'System preferred MFA enabled' = $AuthData.isSystemPreferredAuthenticationMethodEnabled
  'System preferred MFA method'  = $AuthData.systemPreferredAuthenticationMethod
  'Secondary auth method'        = $AuthData.userPreferredMethodForSecondaryAuthentication }
$Report.Add($ReportLine)

}

Source: https://office365itpros.com/2023/06/21/report-user-authentication-methods/

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
technet/graph/preferredauthmethods.1687328485.txt.gz · Last modified: 2023/06/21 08:21 by fk