We have an Azure AD account with Multi Factor Authentication enabled and are wondering if there is a way we connect to it without a prompt, that is without MFA, through Powershell.
We've tried Connect-AzureAD -Credentials
however it doesn't proceed when MFA is setup:
AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access...
If there is any way to have MFA setup and connect through Powershell that would be much appreciated.
No. If MFA is required, you cannot sign in programmatically as a user.
Interactive authentication is required in that case.
If you change your policies to allow authentication from that machine without MFA, then it will work.
You can also use a service principal for authentication instead of a user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With