Saturday, January 18, 2020

MFA enabled/disabled users from using Global access policy


Once the reports gets generated, Sort-out the reports based on the "MFA Methods" will provide the report for people registered with MFA or Not.


Get-msoluser -All | Select-Object @{N='UserPrincipalName';E={$_.UserPrincipalName}},
@{N='MFA Status';E={if ($_.StrongAuthenticationRequirements.State){$_.StrongAuthenticationRequirements.State} else {"Disabled"}}},
@{N='MFA Methods';E={$_.StrongAuthenticationMethods.methodtype}},
@{N='Auth Email';E={$_.StrongAuthenticationUserDetails.email}},
@{N='Auth Phone';E={$_.StrongAuthenticationUserDetails.PhoneNumber}},
@{N='Auth Device';E={$_.StrongAuthenticationPhoneAppDetails.DeviceName}},
@{N='Alternative Phone';E={$_.StrongAuthenticationUserDetails.AlternativePhoneNumber}},
@{N='Alternative Email';E={$_.AlternateEmailAddresses}} Export-Csv -Path C:\Temp\MFA_Report.csv -NoTypeInformation




or 


Get-msoluser -All | Select-Object @{N='UserPrincipalName';E={$_.UserPrincipalName}},

@{N='MFA Status';E={if ($_.StrongAuthenticationRequirements.State){$_.StrongAuthenticationRequirements.State} else {"Disabled"}}},
@{N='MFA Methods';E={$_.StrongAuthenticationMethods.methodtype}},
@{N='Auth Email';E={$_.StrongAuthenticationUserDetails.email}},
@{N='Auth Phone';E={$_.StrongAuthenticationUserDetails.PhoneNumber}},
@{N='Auth Device';E={$_.StrongAuthenticationPhoneAppDetails.DeviceName}},
@{N='Alternative Phone';E={$_.StrongAuthenticationUserDetails.AlternativePhoneNumber}},
@{N='Alternative Email';E={$_.AlternateEmailAddresses}} | Out-GridView

No comments:

Post a Comment

HTML

Script:

JS