Running PowerShell scripts

Running PowerShell scripts

As part of the new user process we need to set a default MFA number, this can be done with a simply script

$TZUPN =$arg1 +'@ourdomain.com'
Install-module Microsoft.Graph.Identity.Signins -Force  -AllowClobber -SkipPublisherCheck
New-MgUserAuthenticationPhoneMethod -UserId $TZUPN -phoneType "office" -phoneNumber "+64 20000000"
New-MgUserAuthenticationEmailMethod -userid $TZUPN -emailaddress "helpdesk@domain.com"

However I think the script needs to authenticate with Azure how is that managed ?

                  New to ADSelfService Plus?