PowerApps-Samples icon indicating copy to clipboard operation
PowerApps-Samples copied to clipboard

`Microsoft.PowerPlatform.Administration.UserManagement` - how to use Multi-Factor authentication?

Open bubbletroubles opened this issue 1 year ago • 1 comments

How to use multi-factor authentication using the Microsoft.PowerPlatform.Administration.UserManagement powershell scripts? Many organizations mandate the use of Multi-Factor auth, especially for priviliged roles (such as what this script requires)

The documentation for the Connect-AzureAD module states that MFA can't be used with the Connect-AzureAD method been used in the script

PS C:\> Connect-AzureAD -Credential $Credential
The first command gets the user credentials, and then stores them in the $Credential variable.

The second command connects the current PowerShell session using the credentials in $Credential.

This account authenticates with Azure Active Directory using organizational ID credentials. You cannot use multi-factor authentication or Microsoft account credentials to run Azure Active Directory cmdlets with this account.```

bubbletroubles avatar Feb 25 '24 22:02 bubbletroubles

@bubbletroubles I have forwarded your question to the people that maintain that code.

phecke avatar Mar 16 '24 00:03 phecke