How to identify if a given user is already linked with SALESFORCE_AUTHENTICATOR. I want to delink user from SALESFORCE_AUTHENTICATOR using an apex logic but before doing it I want to put a validation check in my code, if the user is not using the SALESFORCE_AUTHENTICATOR then my code should not go for delink.

Taking about - App Registration: Salesforce Authenticator on user detail page.

1 Answer 1


I think you would be looking to use SOQL to query the TwoFactorMethodsInfo object to see what verification method users are using. This Object has a boolean flag on it for HasSalesforceAuthenticator which should give you the check you need.

Note it states that your user running the Query will need the Manage Multi-Factor Authentication in API permission to access this object.

So a query would look something like

SELECT HasSalesforceAuthenticator, UserId FROM TwoFactorMethodsInfo WHERE UserId = '1234'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .