bulk Pre-registration for Azure MFA for more Seamless Single Sign on and smooth for MFA roll out

%3CLINGO-SUB%20id%3D%22lingo-sub-1202477%22%20slang%3D%22en-US%22%3Ebulk%20Pre-registration%20for%20Azure%20MFA%20for%20more%20Seamless%20Single%20Sign%20on%20and%20smooth%20for%20MFA%20roll%20out%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1202477%22%20slang%3D%22en-US%22%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2Fblog.3tallah.com%2F2020%2F02%2FBulk-Pre-Register-MFA-For-Users-Without-Forcing-MFA.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-zcSLc5OUrhM%2FXlo_SAgjzmI%2FAAAAAAABDbo%2FmghtylxbiXIm9BqXHyBHmdmV-qUdmiocwCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%20class%3D%22separator%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3EWe%E2%80%99ve%20been%20asked%20many%20times%20to%20do%20a%20bulk%20pre-registration%20for%20Azure%20Active%20Directory%20%3CSTRONG%3EMFA%3C%2FSTRONG%3E%20to%20provide%20our%20customers%E2%80%99%20users%20more%20Seamless%20Single%20Sign%20on%20and%20smooth%20for%20MFA%20rolling%20out.%3CBR%20%2F%3EThis%20script%20helping%20you%20to%3A%3C%2FP%3E%3COL%3E%3CLI%3EConfigure%3CSTRONG%3E%20MFA%3C%2FSTRONG%3E%20Strong%20Authentication%20Methods%3C%2FLI%3E%3CLI%3ESet%20a%20default%20%3CSTRONG%3EMFA%3C%2FSTRONG%3E%20authentication%20method%20for%20all%20users%20or%20number%20of%20users.%3C%2FLI%3E%3CLI%3EUpdate%20Mobile%20Number%20for%20a%20List%20of%20users.%3C%2FLI%3E%3CLI%3EUpdate%20Strong%20Authentication%20Methods%20for%20List%20of%20users%3C%2FLI%3E%3CLI%3EGet%20%3CSTRONG%3EMFA%3C%2FSTRONG%3E%20Strong%20Authentication%20Details%20for%20all%20users.%3C%2FLI%3E%3CLI%3EGet%20%3CSTRONG%3EMFA%3C%2FSTRONG%3E%20Authentication%20contact%20info%20where%20the%20phone%20number%20is%20Null%3C%2FLI%3E%3CLI%3EUpdate%20Mobile%20Number%20Only%20If%20user%20Mobile%20is%20not%20exist%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CEM%3ENOTE%20%3A%20Before%20we%20proceed%20with%20MFA%20and%20SSPR%20Enablement%20and%20configuration%2C%20%3C%2FEM%3E%3CEM%3EUsers%20will%20be%20able%20to%20change%20their%20Authentication%20mobile%20phone%20number%20whenever%20they%20need%20to%2C%20Admins%20won%E2%80%99t%20have%20a%20control%20on%20Authentication%20mobile%20phone%20number%20however%20they%20can%20pre-define%20them%20but%20still%20users%20will%20be%20able%20to%20change%20it.%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%3CBR%20%2F%3E%3C%2FEM%3E%3CSTRONG%3EKeep%20in%20mind%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CLI%3EIf%20you%20have%20provided%20a%20value%20for%26nbsp%3B%3CSTRONG%3EMobile%20phone%26nbsp%3B%3C%2FSTRONG%3Eor%26nbsp%3B%3CSTRONG%3EAlternate%20email%3C%2FSTRONG%3E%2C%20users%20can%20immediately%20use%20those%20values%20to%20reset%20their%20passwords%2C%20even%20if%20they%20haven't%20registered%20for%20the%20service.%20In%20addition%2C%20users%20see%20those%20values%20when%20they%20register%20for%20the%20first%20time%2C%20and%20they%20can%20modify%20them%20if%20they%20want%20to.%20After%20they%20register%20successfully%2C%20these%20values%20are%20persisted%20in%20the%26nbsp%3B%3CSTRONG%3EAuthentication%20Phone%3C%2FSTRONG%3E%26nbsp%3Band%26nbsp%3B%3CSTRONG%3EAuthentication%20Email%3C%2FSTRONG%3E%26nbsp%3Bfields%2C%20respectively.%3C%2FLI%3E%3CLI%3EIf%20the%26nbsp%3B%3CSTRONG%3EPhone%3C%2FSTRONG%3Efield%20is%20populated%20and%26nbsp%3B%3CSTRONG%3EMobile%20phone%3C%2FSTRONG%3E%26nbsp%3Bis%20enabled%20in%20the%20SSPR%20policy%2C%20the%20user%20sees%20that%20number%20on%20the%20password%20reset%20registration%20page%20and%20during%20the%20password%20reset%20workflow.%3C%2FLI%3E%3CLI%3EThe%26nbsp%3B%3CSTRONG%3EAlternate%20phone%3C%2FSTRONG%3Efield%20isn't%20used%20for%20password%20reset.%3C%2FLI%3E%3CLI%3EIf%20the%26nbsp%3B%3CSTRONG%3EEmail%3C%2FSTRONG%3Efield%20is%20populated%20and%26nbsp%3B%3CSTRONG%3EEmail%3C%2FSTRONG%3E%26nbsp%3Bis%20enabled%20in%20the%20SSPR%20policy%2C%20the%20user%20sees%20that%20email%20on%20the%20password%20reset%20registration%20page%20and%20during%20the%20password%20reset%20workflow.%3C%2FLI%3E%3CLI%3EIf%20the%26nbsp%3B%3CSTRONG%3EAlternate%20email%3C%2FSTRONG%3Efield%20is%20populated%20and%26nbsp%3B%3CSTRONG%3EEmail%3C%2FSTRONG%3E%26nbsp%3Bis%20enabled%20in%20the%20SSPR%20policy%2C%20the%20user%26nbsp%3B%3CSTRONG%3Ewon't%3C%2FSTRONG%3E%26nbsp%3Bsee%20that%20email%20on%20the%20password%20reset%20registration%20page%2C%20but%20they%20see%20it%20during%20the%20password%20reset%20workflow.%3C%2FLI%3E%3C%2FUL%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CH2%20id%3D%22toc-hId--1387773583%22%20id%3D%22toc-hId--1387773583%22%3E%3CSPAN%3EDownload%20%3CA%20href%3D%22https%3A%2F%2Fgallery.technet.microsoft.com%2FBulk-Pre-Register-MFA-For-4ecd3263%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%3C%2FSPAN%3E%3C%2FH2%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CSTRONG%3E%3CI%3EScript%20In%20details.%26nbsp%3B%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3EParameters%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%26nbsp%3B%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSPAN%3E%24UsersCSV%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3E%22%3CUSERS%20csv%3D%22%22%20file%3D%22%22%20path%3D%22%22%3E%22%3C%2FUSERS%3E%3C%2FSPAN%3E%20%3CSPAN%3E%23%20Example%20C%3A%5CTemp%5CUsersMFA.csv%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CBLOCKQUOTE%3E%3CSPAN%3E%24OutPutFolder%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3E%22C%3A%5CTemp%22%3C%2FSPAN%3E%20%3CSPAN%3E%23%20Example%20C%3A%5CTemp%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%3E%3CSPAN%3EIf%20User%20Mobile%20is%20exist%20(AD%20users%20with%20specific%20AD%20attribute%20NOT%20null)%3C%2FSPAN%3E%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSPAN%3EGet-AzureADUser%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3Eselect%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3EUserPrincipalName%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EMobile%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3EWhere-Object%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%20%7B%20%3C%2FSPAN%3E%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.Mobile%20%3C%2FSPAN%3E%3CSPAN%3E-ne%3C%2FSPAN%3E%20%3CSPAN%3E%24null%3C%2FSPAN%3E%3CSPAN%3E%20%7D%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-0zaiFWxriLY%2FXlp7bjZh80I%2FAAAAAAABDcM%2Fiq-hHgbmwXsd6Zw6nrhiTRTJZzJXLJoWACLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525281%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-0zaiFWxriLY%2FXlp7bjZh80I%2FAAAAAAABDcM%2Fiq-hHgbmwXsd6Zw6nrhiTRTJZzJXLJoWACLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525281%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIf%20User%20Mobile%20is%20exist%20(AD%20users%20with%20specific%20AD%20attribute%20is%20null)%3C%2FSPAN%3E%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSPAN%3EGet-AzureADUser%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%7C%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%3Eselect%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EUserPrincipalName%3C%2FSPAN%3E%3CSPAN%3E%2C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EMobile%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%7C%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%3EWhere-Object%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%7B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.Mobile%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-eq%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24null%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-wvToSkYhrbc%2FXlp7cVmKyxI%2FAAAAAAABDcU%2FksEffmprZHU1mDWs4P6BT_5jxvU6qih-wCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525282%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-wvToSkYhrbc%2FXlp7cVmKyxI%2FAAAAAAABDcU%2FksEffmprZHU1mDWs4P6BT_5jxvU6qih-wCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525282%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3E%23Get%20All%20Users%20Details%3C%2FSPAN%3E%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSPAN%3EGet-AzureADUser%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3Eselect%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3EDisplayName%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EUserPrincipalName%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EotherMails%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EMobile%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3ETelephoneNumber%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3EFormat-Table%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FBLOCKQUOTE%3E%3CDIV%20class%3D%22MsoNormal%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-l_ZlJKShsI8%2FXlp7c85knYI%2FAAAAAAABDcY%2FQV1CBnRflbUiO_eTvXUPtltDc8cp4B-VQCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525283%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-l_ZlJKShsI8%2FXlp7c85knYI%2FAAAAAAABDcY%2FQV1CBnRflbUiO_eTvXUPtltDc8cp4B-VQCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525283%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3EList%20users%20%22Authentication%20contact%20info%22%20attributes%20from%20AzureAD%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSPAN%3EGet-MsolUser%3C%2FSPAN%3E%20%3CI%3E%3CSPAN%3E-All%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3Eselect%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3EDisplayName%3C%2FSPAN%3E%20%3CSPAN%3E-ExpandProperty%3C%2FSPAN%3E%20%3CSPAN%3EStrongAuthenticationUserDetails%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3Eft%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3EDisplayName%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EPhoneNumber%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EEmail%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3EOut-File%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3E%24OutPutFolder%3C%2FSPAN%3E%3CSPAN%3E%22%5CStrongAuthenticationUserDetails.csv%22%3C%2FSPAN%3E%20%3CSPAN%3E-Verbose%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3EList%20users%20%22Authentication%20contact%20info%20where%20Phone%20number%20is%20Null%22%20attributes%20from%20AzureAD%20%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSPAN%3EGet-Msol%20User%3C%2FSPAN%3E%20%3CI%3E%3CSPAN%3E-All%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3Eselect%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3EDisplayName%3C%2FSPAN%3E%20%3CSPAN%3E-ExpandProperty%3C%2FSPAN%3E%20%3CSPAN%3EStrongAuthenticationUserDetails%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3EWhere-Object%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%20%7B%20%3C%2FSPAN%3E%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.PhoneNumber%20%3C%2FSPAN%3E%3CSPAN%3E-eq%3C%2FSPAN%3E%20%3CSPAN%3E%24null%3C%2FSPAN%3E%3CSPAN%3E%20%7D%20%3C%2FSPAN%3E%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3Eft%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3EDisplayName%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EPhoneNumber%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EEmail%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3EOut-File%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3E%24OutPutFolder%3C%2FSPAN%3E%3CSPAN%3E%22%5CStrongAuthenticationUserPhoneNumberNull.csv%22%3C%2FSPAN%3E%20%3CSPAN%3E-Verbose%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-vraObsf38OI%2FXlp7c6UFsHI%2FAAAAAAABDcc%2FAfc5mknL0lI85_QkPsf02MKjDNEc8onMwCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525284%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-vraObsf38OI%2FXlp7c6UFsHI%2FAAAAAAABDcc%2FAfc5mknL0lI85_QkPsf02MKjDNEc8onMwCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525284%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3E%3CSTRONG%3EStrongAuthenticationUserPhoneNumber%20File%20Details%26nbsp%3B%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-OnOkXt-wPwU%2FXlp7dOiNckI%2FAAAAAAABDcg%2FRliuYQAUX1AuuvWskEfWt2UZ3JDgIZySACLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525285%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-OnOkXt-wPwU%2FXlp7dOiNckI%2FAAAAAAABDcg%2FRliuYQAUX1AuuvWskEfWt2UZ3JDgIZySACLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525285%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%20class%3D%22separator%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3EList%20users%20%22Strong%20Authentication%20Methods%22%20attributes%20from%20AzureAD%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22separator%22%3E%26nbsp%3B%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSPAN%3EGet-MsolUser%3C%2FSPAN%3E%20%3CI%3E%3CSPAN%3E-All%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3Eselect%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3EDisplayName%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EUserPrincipalName%3C%2FSPAN%3E%20%3CSPAN%3E-ExpandProperty%3C%2FSPAN%3E%20%3CSPAN%3EStrongAuthenticationMethods%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3Eselect%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3EUserPrincipalName%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EIsDefault%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EMethodType%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-jDVO1A7H6Ng%2FXlp7eFhHP3I%2FAAAAAAABDco%2F4TCgYVsvnzs6z_gCTGh2Eh0xWdTil8tPQCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525287%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-jDVO1A7H6Ng%2FXlp7eFhHP3I%2FAAAAAAABDco%2F4TCgYVsvnzs6z_gCTGh2Eh0xWdTil8tPQCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525287%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3EAll%20users%20who%20have%20signed%20up%20for%20SSPR.%3C%2FSPAN%3E%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eget-msoluser%3C%2FSPAN%3E%20%3CI%3E%3CSPAN%3E-All%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3EWhere%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%20%7B%20%3C%2FSPAN%3E%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.StrongAuthenticationUserDetails%20%3C%2FSPAN%3E%3CSPAN%3E-ne%3C%2FSPAN%3E%20%3CSPAN%3E%24null%3C%2FSPAN%3E%3CSPAN%3E%20%7D)%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3EAll%20users%20who%20have%20not%20signed%20up%20for%20SSPR%20%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eget-msoluser%3C%2FSPAN%3E%20%3CI%3E%3CSPAN%3E-All%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3EWhere%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%20%7B%20%3C%2FSPAN%3E%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.StrongAuthenticationUserDetails%20%3C%2FSPAN%3E%3CSPAN%3E-eq%3C%2FSPAN%3E%20%3CSPAN%3E%24null%3C%2FSPAN%3E%3CSPAN%3E%20%7D)%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-_NWYt1usX_E%2FXlp7eBNA30I%2FAAAAAAABDcs%2FkiwbZeim90Q1XMPa3_TFUMq6A_AakKpQACLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525288%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-_NWYt1usX_E%2FXlp7eBNA30I%2FAAAAAAABDcs%2FkiwbZeim90Q1XMPa3_TFUMq6A_AakKpQACLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525288%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3EUpdate%20Mobile%20Number%20for%20List%20of%20users%3C%2FSPAN%3E%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSTRONG%3E%3CSPAN%3EImport-CSV%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3E-Path%3C%2FSPAN%3E%20%3CSPAN%3E%24UsersCSV%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3EForEach-Object%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%20%7B%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3ESet-AzureADUser%3C%2FSPAN%3E%20%3CI%3E%3CSPAN%3E-ObjectId%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.UserPrincipalName%20%3C%2FSPAN%3E%3CI%3E%3CSPAN%3E-Mobile%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.Mobile%20%3C%2FSPAN%3E%3CI%3E%3CSPAN%3E-ErrorAction%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3ESilentlyContinue%3C%2FSPAN%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-_vdAy5A-7PU%2FXlp7eNuannI%2FAAAAAAABDcw%2FtknJOkDn2xodH5dvZpj2aqRAE5dnnGuagCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525289%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-_vdAy5A-7PU%2FXlp7eNuannI%2FAAAAAAABDcw%2FtknJOkDn2xodH5dvZpj2aqRAE5dnnGuagCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%2525289%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3EMicrosoft%20StrongAuthenticationMethod%20Parameters%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24OneWaySMS%20%3D%20New-Object%20-TypeName%20Microsoft.Online.Administration.StrongAuthenticationMethod%0A%24OneWaySMS.IsDefault%20%3D%20%24false%0A%24OneWaySMS.MethodType%20%3D%20%22OneWaySMS%22%0A%0A%24TwoWayVoiceMobile%20%3D%20New-Object%20-TypeName%20Microsoft.Online.Administration.StrongAuthenticationMethod%0A%24TwoWayVoiceMobile.IsDefault%20%3D%20%24true%0A%24TwoWayVoiceMobile.MethodType%20%3D%20%22TwoWayVoiceMobile%22%0A%0A%24PhoneAppNotification%20%3D%20New-Object%20-TypeName%20Microsoft.Online.Administration.StrongAuthenticationMethod%0A%24PhoneAppNotification.IsDefault%20%3D%20%24false%0A%24PhoneAppNotification.MethodType%20%3D%20%22PhoneAppNotification%22%0A%0A%24PhoneAppOTP%20%3D%20New-Object%20-TypeName%20Microsoft.Online.Administration.StrongAuthenticationMethod%0A%24PhoneAppOTP.IsDefault%20%3D%20%24false%0A%24PhoneAppOTP.MethodType%20%3D%20%22PhoneAppOTP%22%0A%0A%0A%24methods%20%3D%20%40(%24OneWaySMS%2C%20%24TwoWayVoiceMobile%2C%20%24PhoneAppNotification%2C%20%24PhoneAppOTP)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-0KuepuzfJYk%2FXlp7bddArfI%2FAAAAAAABDcE%2Fgao1QlVP0ZIV6Vkm4SG3_NH5bbJ11xuOQCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%25252810%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-0KuepuzfJYk%2FXlp7bddArfI%2FAAAAAAABDcE%2Fgao1QlVP0ZIV6Vkm4SG3_NH5bbJ11xuOQCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%25252810%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3ESet%20Default%20Strong%20Authentication%20Methods%20for%20List%20of%20users%3C%2FSPAN%3E%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSTRONG%3E%3CSPAN%3EImport-CSV%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3E-Path%3C%2FSPAN%3E%20%3CSPAN%3E%24UsersCSV%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3EForeach-Object%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%20%7B%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3ESet-MsolUser%3C%2FSPAN%3E%20%3CI%3E%3CSPAN%3E-UserPrincipalName%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.UserPrincipalName%20%3C%2FSPAN%3E%3CI%3E%3CSPAN%3E-StrongAuthenticationMethods%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%24methods%3C%2FSPAN%3E%3CSPAN%3E%7D%20%3C%2FSPAN%3E%3CSPAN%3E-ErrorAction%3C%2FSPAN%3E%20%3CSPAN%3ESilentlyContinue%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-QLVqUHG9Y4I%2FXlp7bWQ4ihI%2FAAAAAAABDcI%2Fv-S6nijYpDIrIbQkKz7m9rI9OG3FRKx5ACLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%25252811%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-QLVqUHG9Y4I%2FXlp7bWQ4ihI%2FAAAAAAABDcI%2Fv-S6nijYpDIrIbQkKz7m9rI9OG3FRKx5ACLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%25252811%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22MsoNormal%22%3E%3CSPAN%3EPre-register%20authentication%20Info%20for%20List%20of%20users.%3C%2FSPAN%3E%3C%2FDIV%3E%3CBLOCKQUOTE%3E%3CSTRONG%3E%3CSPAN%3EImport-CSV%3C%2FSPAN%3E%3C%2FSTRONG%3E%20%3CSPAN%3E-Path%3C%2FSPAN%3E%20%3CSPAN%3E%24UsersCSV%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%3EForEach-Object%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%20%7B%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3ESet-AzureADUser%3C%2FSPAN%3E%20%3CI%3E%3CSPAN%3E-ObjectId%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.UserPrincipalName%20%3C%2FSPAN%3E%3CI%3E%3CSPAN%3E-OtherMails%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.OtherMails%20%3C%2FSPAN%3E%3CI%3E%3CSPAN%3E-Mobile%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.Mobile%20%3C%2FSPAN%3E%3CI%3E%3CSPAN%3E-TelephoneNumber%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3E%24_%3C%2FSPAN%3E%3CSPAN%3E.TelephoneNumber%20%3C%2FSPAN%3E%3CI%3E%3CSPAN%3E-ErrorAction%3C%2FSPAN%3E%3C%2FI%3E%20%3CSPAN%3ESilentlyContinue%3C%2FSPAN%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CDIV%20class%3D%22separator%22%3E%3CA%20href%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-nAwYDJhd4XQ%2FXlp7cIQrEqI%2FAAAAAAABDcQ%2F3bsnZpLSPU8YnFwFjksnz4oePz006x_3gCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%25252812%252529.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CIMG%20src%3D%22https%3A%2F%2F1.bp.blogspot.com%2F-nAwYDJhd4XQ%2FXlp7cIQrEqI%2FAAAAAAABDcQ%2F3bsnZpLSPU8YnFwFjksnz4oePz006x_3gCLcBGAsYHQ%2Fs1600%2FBulk%252BPre-Register%252BMFA%252BFor%252BUsers%252BWithout%252BForcing%252BMFA%252B%25252812%252529.png%22%20border%3D%220%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3CDIV%20class%3D%22separator%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22separator%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1202477%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Active%20Directory%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIdentity%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMulti-Factor%20Authentication%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor



 

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:

  1. Configure MFA Strong Authentication Methods
  2. Set a default MFA authentication method for all users or number of users.
  3. Update Mobile Number for a List of users.
  4. Update Strong Authentication Methods for List of users
  5. Get MFA Strong Authentication Details for all users.
  6. Get MFA Authentication contact info where the phone number is Null
  7. Update Mobile Number Only If user Mobile is not exist

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:

  • If you have provided a value for Mobile phone or Alternate email, users can immediately use those values to reset their passwords, even if they haven't registered for the service. In addition, users see those values when they register for the first time, and they can modify them if they want to. After they register successfully, these values are persisted in the Authentication Phone and Authentication Email fields, respectively.
  • If the Phonefield is populated and Mobile phone is enabled in the SSPR policy, the user sees that number on the password reset registration page and during the password reset workflow.
  • The Alternate phonefield isn't used for password reset.
  • If the Emailfield is populated and Email is enabled in the SSPR policy, the user sees that email on the password reset registration page and during the password reset workflow.
  • If the Alternate emailfield is populated and Email is enabled in the SSPR policy, the user won't see that email on the password reset registration page, but they see it during the password reset workflow.
 

Download here.

 
 
Script In details. 
 
Parameters
 
$UsersCSV = "<Users CSV File Path>" # Example C:\Temp\UsersMFA.csv
$OutPutFolder = "C:\Temp" # Example C:\Temp
If User Mobile is exist (AD users with specific AD attribute NOT null)
Get-AzureADUser | select UserPrincipalName, Mobile | Where-Object { $_.Mobile -ne $null }
 
 
If User Mobile is exist (AD users with specific AD attribute is null)
Get-AzureADUser | select UserPrincipalNameMobile | Where-Object { $_.Mobile -eq $null }
 
#Get All Users Details
Get-AzureADUser | select DisplayName, UserPrincipalName, otherMails, Mobile, TelephoneNumber | Format-Table
 
 
 
List users "Authentication contact info" attributes from AzureAD
 
Get-MsolUser -All | select DisplayName -ExpandProperty StrongAuthenticationUserDetails | ft DisplayName, PhoneNumber, Email | Out-File $OutPutFolder"\StrongAuthenticationUserDetails.csv" -Verbose 
List users "Authentication contact info where Phone number is Null" attributes from AzureAD
 
Get-Msol User -All | select DisplayName -ExpandProperty StrongAuthenticationUserDetails | Where-Object { $_.PhoneNumber -eq $null } | ft DisplayName, PhoneNumber, Email | Out-File $OutPutFolder"\StrongAuthenticationUserPhoneNumberNull.csv" -Verbose
 
StrongAuthenticationUserPhoneNumber File Details 
 
 
 
List users "Strong Authentication Methods" attributes from AzureAD
 
Get-MsolUser -All | select DisplayName, UserPrincipalName -ExpandProperty StrongAuthenticationMethods | select UserPrincipalName, IsDefault, MethodType
 
All users who have signed up for SSPR.
(get-msoluser -All | Where { $_.StrongAuthenticationUserDetails -ne $null })
All users who have not signed up for SSPR
 
(get-msoluser -All | Where { $_.StrongAuthenticationUserDetails -eq $null })
 
 
Update Mobile Number for List of users
Import-CSV -Path $UsersCSV | ForEach-Object {
     Set-AzureADUser -ObjectId $_.UserPrincipalName -Mobile $_.Mobile -ErrorAction SilentlyContinue}
 
 
Microsoft StrongAuthenticationMethod Parameters
 
 

 

 

 

$OneWaySMS = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationMethod
$OneWaySMS.IsDefault = $false
$OneWaySMS.MethodType = "OneWaySMS"

$TwoWayVoiceMobile = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationMethod
$TwoWayVoiceMobile.IsDefault = $true
$TwoWayVoiceMobile.MethodType = "TwoWayVoiceMobile"

$PhoneAppNotification = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationMethod
$PhoneAppNotification.IsDefault = $false
$PhoneAppNotification.MethodType = "PhoneAppNotification"

$PhoneAppOTP = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationMethod
$PhoneAppOTP.IsDefault = $false
$PhoneAppOTP.MethodType = "PhoneAppOTP"


$methods = @($OneWaySMS, $TwoWayVoiceMobile, $PhoneAppNotification, $PhoneAppOTP)

 

 

 

 
 
 
Set Default Strong Authentication Methods for List of users
Import-CSV -Path $UsersCSV | Foreach-Object {
     Set-MsolUser -UserPrincipalName $_.UserPrincipalName -StrongAuthenticationMethods $methods} -ErrorAction SilentlyContinue
 
 
 
Pre-register authentication Info for List of users.
Import-CSV -Path $UsersCSV | ForEach-Object {
     Set-AzureADUser -ObjectId $_.UserPrincipalName -OtherMails $_.OtherMails -Mobile $_.Mobile -TelephoneNumber $_.TelephoneNumber -ErrorAction SilentlyContinue}
 
 
 
 
 
0 Replies