We’ve been asked many times to do a bulk pre-registration for Azure Active Directory MFA to provide our customers’ users more Seamless Single Sign on and smooth for MFA rolling out.
This script helping you to:
NOTE : Before we proceed with MFA and SSPR Enablement and configuration, Users will be able to change their Authentication mobile phone number whenever they need to, Admins won’t have a control on Authentication mobile phone number however they can pre-define them but still users will be able to change it.
Keep in mind:
$UsersCSV = “<Users CSV File Path>” # Example C:\Temp\UsersMFA.csv
$OutPutFolder = “C:\Temp” # Example C:\Temp
Get-AzureADUser | select UserPrincipalName, Mobile | Where-Object { $_.Mobile -ne $null }
Get-AzureADUser | select UserPrincipalName, Mobile | Where-Object { $_.Mobile -eq $null }
Get-AzureADUser | select DisplayName, UserPrincipalName, otherMails, Mobile, TelephoneNumber | Format-Table
Get-MsolUser -All | select DisplayName -ExpandProperty StrongAuthenticationUserDetails | ft DisplayName, PhoneNumber, Email | Out-File $OutPutFolder“\StrongAuthenticationUserDetails.csv” -Verbose
Get-Msol
User -All | select DisplayName -ExpandProperty StrongAuthenticationUserDetails | Where-Object { $_.PhoneNumber -eq $null } | ft DisplayName, PhoneNumber, Email | Out-File $OutPutFolder“\StrongAuthenticationUserPhoneNumberNull.csv” -Verbose
Get-MsolUser -All | select DisplayName, UserPrincipalName -ExpandProperty StrongAuthenticationMethods | select UserPrincipalName, IsDefault, MethodType
(get-msoluser -All | Where { $_.StrongAuthenticationUserDetails
-ne $null })
(get-msoluser -All | Where { $_.StrongAuthenticationUserDetails
-eq $null })
Import-CSV -Path $UsersCSV | ForEach-Object {
Set-AzureADUser -ObjectId $_.UserPrincipalName
-Mobile $_.Mobile -ErrorAction SilentlyContinue}
Import-CSV -Path $UsersCSV | Foreach-Object {
Set-MsolUser -UserPrincipalName $_.UserPrincipalName
-StrongAuthenticationMethods $methods} -ErrorAction SilentlyContinue
Import-CSV -Path $UsersCSV | ForEach-Object {
Set-AzureADUser -ObjectId $_.UserPrincipalName
-OtherMails $_.OtherMails -Mobile $_.Mobile -TelephoneNumber $_.TelephoneNumber -ErrorAction SilentlyContinue}
In this session, we will explore the architecture and best practices for building secure and…
Introduction Welcome to our comprehensive series on Azure Web Application Firewall (WAF) security! In this…
Introduction Welcome to the third installment of our Azure Web Application Firewall (WAF) Security Lab…
Introduction Welcome to the second installment of our Azure Web Application Firewall (WAF) Security Lab…
Introduction Welcome to the first installment of our four-part Azure Web Application Firewall (WAF) Security…
Introduction In today's digital landscape, protecting web applications from sophisticated attacks is crucial. Azure Web…