I need to create a user over powershell and set 2FA using GoogleAuthenticator. I tried the following, but it didnt work:
$securePassword = ConvertTo-SecureString "SomePasswordToSatisfy" -AsPlainText -Force
$newUser = New-RDMUser -Login $name -AuthentificationType "AzureAD" -Email $email -Password $securePassword
$newUser.FirstName = $fname
$newUser.LastName = $lname
$newUser.LoginEmail = $erpId
$newUser.UserInfo.UserAccount.TwoFactorInfo.AccountName=$name
$newUser.UserInfo.UserAccount.TwoFactorInfo.AuthenticationType='GoogleAuthenticator'
$newUser.UserInfo.UserAccount.TwoFactorInfo.IsPreConfigured=$true
Set-RDMUser -User $newUser
I think I found a way by creating a new instance of TwoFactorInfo, please advise if this is the right way.
Hello,
Unfortunately, I don't think it is possible to set any 2FA using PowerShell as the UserAccount properties are read only. I will verify with an engineer about it.
What data source type are you using?
Best regards,
Érica Poirier
Hi -
Is there any update on this? I'm trying to do the same thing - set the MFA configuration as Optional, so that select service/admin accounts can bypass it, but functionally require it of all users. Using Devolutions Password Server Enterprise, Domain authentication.
Thank you!
Hello,
Thank you for your feedback. Sadly, there is no new development on this right now but I have asked for a priority increase on our internal ticket RDM-5517. Once an update will be available, we will keep you posted.
Best regards,
Érica Poirier