Skip to content

Instantly share code, notes, and snippets.

@chrisbrownie
Created July 21, 2015 23:48
Show Gist options
  • Save chrisbrownie/3ac1bb3a60752f5fb63c to your computer and use it in GitHub Desktop.
Save chrisbrownie/3ac1bb3a60752f5fb63c to your computer and use it in GitHub Desktop.
# Get all users with MFA enabled
# Import MSOL Module
Import-Module MSOnline
# Connect to the service
Connect-MsolService
#Find all MFA enabled users
$MfaUsers = Get-MsolUser -All | Where-Object {$_.StrongAuthenticationRequirements -like "*"}
$MfaUsers | Select UserPrincipalName,
@{Name="MethodType";Expression={$_.StrongAuthenticationMethods[0].MethodType}},
@{Name="State";Expression={$_.StrongAuthenticationRequirements.State}},
@{Name="RelyingParty";Expression={$_.StrongAuthenticationRequirements.RelyingParty}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment