Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Flow to enable MFA on new user account ?

Our O365 tenant does not use Conditional Access or I wouldn't need to use power automate for this reason ...


Therefore, when HR creates a new O365 user via a Power Automate button, a O365 global admin has to manually turn on MFA for that new user.  I am looking for a way to build a power automate action that will enable MFA on an account and force the user to configure MFA signup.  Is this possible?



Helper I
Helper I

Re: Flow to enable MFA on new user account ?

I was hoping for a cleaner way, but with the use of an Azure runbook I was able to build a powershell script that I could call from my power automate flow to successfully set MFA on a single user.


I credit this article/author here for the push in the right direction:


 Param (
 [string] $Employee = ""
 $credObject = Get-AutomationPSCredential -AutomatedAccountName "ScriptServiceAccount"
 Connect-MsolService -Credential $credObject
 $auth = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement
 $auth.RelyingParty = "*"
 $auth.State = "Enabled"
 $auth.RememberDevicesNotIssuedBefore = (Get-Date)
 Set-MsolUser -UserPrincipalName $Employee -StrongAuthenticationRequirements $auth


Regular Visitor

Re: Flow to enable MFA on new user account ?

I think I may have found a cleaner option for you. Create a Security Group that will assign the MFA attribute to the members. Then the Azure AD connector will be able to assign the new user to the Security Group and it should assign them the MFA attribute. I do not have an MFA environment to test this on so I cannot confirm this but it was suggested here for license assignment but MFA service can also be assigned through group membership.

Helper I
Helper I

Re: Flow to enable MFA on new user account ?

I will look into it.  Thank you for the suggestion!

Helpful resources


Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (10,973)