Enable MFA for all users in table sys_user

ALe1
Tera Contributor

Hi Guys.

 

Please, how can enable MFA for all user in my instance? In table sys_user, the columm "Enable Multifactor Authentication" is "false", but, i nedeed change for "TRUE" for all user.

 

Thanks in advance...

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @ALe1 ,

You can very easily set up a business rule to ensure that the enable_multifactor_authn field on the sys_user table is always populated. However, you do want to be careful because just turning on MFA for everyone can potentially break things like existing inbound REST interfaces if they only use Basic auth.

 if you want to enable MFA for all user then you can just run the below script in background and you will be able to set it for all users:

SandeepDutta_0-1683596778925.png

 

Script to be used:

var gr = new GlideRecord();
gr.addQuery('active',true);
gr.query();
while(gr.next()){
gr.enable_multifactor_authn = true
gr.update();
}

 

View solution in original post

5 REPLIES 5

Community Alums
Not applicable

Hi @ALe1 ,

You can very easily set up a business rule to ensure that the enable_multifactor_authn field on the sys_user table is always populated. However, you do want to be careful because just turning on MFA for everyone can potentially break things like existing inbound REST interfaces if they only use Basic auth.

 if you want to enable MFA for all user then you can just run the below script in background and you will be able to set it for all users:

SandeepDutta_0-1683596778925.png

 

Script to be used:

var gr = new GlideRecord();
gr.addQuery('active',true);
gr.query();
while(gr.next()){
gr.enable_multifactor_authn = true
gr.update();
}

 

@Community Alums Thanks for the answer. Does it also work for new users? Because new users are entering as "False". thanks. How do I get new users to also log in as "True"? tks

 

Community Alums
Not applicable

Hi @ALe1 ,

 yes Offcourse it would work for new users, if in the sys_user table , the users are active as " True", it should work.

 

Hi @Community Alums  , In fact it would be for new registered users, it should enter the table as "true". Today, they enter in the table as "False". How do I make it "true" permanently? tks