function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hutch KolozyanHutch Kolozyan 

Login History - All possible failure types

We're trying to understand what possible types of failures are returned for the Status field in the Login History API (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_loginhistory.htm). 

The documentation only mentions that it can be success or a reason for the failure, however, is it possible to explicitly understand the different types of failure? Based on failure type, we'd like to infer the of the failure. 

For instance, I am not sure if SalesForce does any suspicious login detection. If so and if that is available in the status Status, then if a login was blocked because it was suspicious would be of higher priority than a single incorrect password entry.
Mayank_JoshiMayank_Joshi
I guess, as per the documentation whatever you get in the Status field can only be captured. But, do you also get any email notification? if any suspicious login attempt; then it can be handled with Apex email handler classes. 
Hutch KolozyanHutch Kolozyan
Mayank, we really don't know what we will get or if SalesForce decides to add new 'failure types'. Right now, in our test environment, if there is a successful login, then the value is "Success". If I mistype my password, the value is "Invalid Password". But are there more failure types?

Also, we only work with the Login History and don't want to couple our business logic to the Apex email handler.

It would be best for SalesForce to specify exactly what values users can expect.