If at user pool level MFA(TOTP) is enabled, for every user inside the pool MFA is by default enabled. I need to distinguish between users who have set up their MFA and users who still haven't set up the MFA. (setting up is registering the TOTP based authentication through apps like google authenticator etc)
To ascertain the above what I did was I tried to fetch the user object info using the GetUser API. If the response contains the "UserMFASettingList": [ "string" ]
I presumed user has already set up the MFA but this approach failed at certain cases. e.g for a user who has not set up his MFA and he disables and then again enables the MFA he has the above property populated as well so checking for this property doesn't work. I have used the AdminSetUserMFAPreference API to achieve enable and disable.
Is there any explicit API or a method etc that can help me in determining how many users in a userpool have setup the MFA and how many haven't?