Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions MfaAuthMethodAnalysis.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ function Analyse-MsolUserStrongAuthMethods {
#Set user properties
$UserPrincipalName = $_.UserPrincipalName
$DisplayName = $_.DisplayName
$AuthPhone = $_.StrongAuthenticationUserDetails.PhoneNumber
$AltAuthPhone = $_.StrongAuthenticationUserDetails.AlternativePhoneNumber
[string]$ObjectId = $_.ObjectId

if ($LocationInfo) {
Expand Down Expand Up @@ -263,6 +265,8 @@ function Analyse-MsolUserStrongAuthMethods {
Sms = $Sms
Phone = $Phone
AltPhone = $AltPhone
AuthPhone = $AuthPhone
AltAuthPhone = $AltAuthPhone
Recommendations = $Recommendations

}
Expand All @@ -282,6 +286,8 @@ function Analyse-MsolUserStrongAuthMethods {
Sms = $Sms
Phone = $Phone
AltPhone = $AltPhone
AuthPhone = $AuthPhone
AltAuthPhone = $AltAuthPhone
Recommendations = $Recommendations

}
Expand Down Expand Up @@ -472,13 +478,13 @@ if ($DomainInfo) {
#Create file with header
if ($LocationInfo) {

Add-Content -Value "UserPrincipalName,DisplayName,ObjectId,UpnDomain,UsageLocation,Country,MfaAuthMethodCount,DefaultMethod,AppNotification,OathTotp,Sms,Phone,AltPhone,Recommendations" `
Add-Content -Value "UserPrincipalName,DisplayName,ObjectId,UpnDomain,UsageLocation,Country,MfaAuthMethodCount,DefaultMethod,AppNotification,OathTotp,Sms,Phone,AltPhone,AuthPhone,AltAuthPhone,Recommendations" `
-Path $OutputFile

}
else {

Add-Content -Value "UserPrincipalName,DisplayName,ObjectId,MfaAuthMethodCount,DefaultMethod,AppNotification,OathTotp,Sms,Phone,AltPhone,Recommendations" `
Add-Content -Value "UserPrincipalName,DisplayName,ObjectId,MfaAuthMethodCount,DefaultMethod,AppNotification,OathTotp,Sms,Phone,AltPhone,AuthPhone,AltAuthPhone,Recommendations" `
-Path $OutputFile

}
Expand Down