<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to find users with email MFA enabled and get count of MFA users?]]></title><description><![CDATA[<p dir="auto">I need to query FusionAuth to:</p>
<ol>
<li>Find all users who have email-based MFA (two-factor authentication) configured</li>
<li>Get an accurate count of these users without retrieving all user records</li>
<li>Determine when a user last used their MFA method</li>
</ol>
<p dir="auto">Is there a way to efficiently search for users by their configured MFA methods and get timestamp information about MFA usage?</p>
]]></description><link>https://fusionauth.io/community/forum/topic/3317/how-to-find-users-with-email-mfa-enabled-and-get-count-of-mfa-users</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 03:13:33 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/3317.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Nov 2026 22:06:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to find users with email MFA enabled and get count of MFA users? on Tue, 03 Nov 2026 22:06:17 GMT]]></title><description><![CDATA[<h2>Finding Users with Email MFA Configured</h2>
<p dir="auto">You can search for users with email MFA using the query string pattern in either the Admin UI search bar or via the Search API:</p>
<pre><code>twoFactor.methods.method:email
</code></pre>
<p dir="auto">This follows the same pattern used for searching users by any MFA method.</p>
<h2>Getting an Accurate Count Efficiently</h2>
<p dir="auto">To get a count without retrieving all user records, use the Search API with <code>accurateTotal</code> enabled and a minimal <code>numberOfResults</code>:</p>
<pre><code class="language-json">{
  "search": {
    "accurateTotal": true,
    "queryString": "twoFactor.methods.method:email",
    "numberOfResults": 1,
    "startRow": 0
  }
}
</code></pre>
<p dir="auto">The response will include a <code>total</code> field containing the exact count of matching users.</p>
<h2>Last-Used MFA Information</h2>
<p dir="auto">Unfortunately, FusionAuth does not store a timestamp for when a user last used their MFA method. However, each MFA method object includes a <code>lastUsed</code> boolean field at <code>users[x].twoFactor.methods[x].lastUsed</code> that indicates which method was most recently used by that user. This is a boolean flag rather than a timestamp, so you can identify which method was used last but not when it was used.</p>
]]></description><link>https://fusionauth.io/community/forum/post/8974</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/8974</guid><dc:creator><![CDATA[FASupportBot]]></dc:creator><pubDate>Tue, 03 Nov 2026 22:06:17 GMT</pubDate></item></channel></rss>