Is there any way to query for users that have 2FA enabled in the dashboard
-
Is there a query I can run on the user search which will show me users with 2FA enabled?
-
The MFA attributes were added recently to the elasticsearch index on a user. This should be available using an ES query in version 1.30.1 and greater.
https://fusionauth.io/docs/v1/tech/release-notes/
https://github.com/FusionAuth/fusionauth-issues/issues/1352
https://fusionauth.io/docs/v1/tech/apis/users/#elasticsearch-search-enginethe user will have a variation of these attributes
"twoFactor" : { "methods" : [ { "authenticator" : { "algorithm" : "HmacSHA1", "codeLength" : 6, "timeStep" : 30 }, "id" : "HWV2", "method" : "authenticator" } ] },
Thanks,
Josh -
To add a further note,
You can search these attributes in the following manner
twoFactor.methods.method:authenticator
ortwoFactor.methods.method:*
in the Admin UI under users or using the Search API.
Thanks,
Josh -
As a final note, you may want to upgrade to version
1.30.2
(just released) as we made some slight improvements as to the timing of when this MFA information is available in the ES index.Thanks,
Josh -
Perfect Joshua.
This gives me what I need!
Thank you!