The title basically asks the question - using SOQL, how can I tell which of my Users are current locked out because they forgot or fat-fingered their password too many times?

Using this basic information, I would like to someday be able to either:

  1. Proactively reach out to a user who is in this situation OR
  2. Identify a potential security threat before the password cooling-off period expires.

You can use the relatively new UserLogin sobject to get this,

select id, username from user where id in (select userId from userLogin where isPasswordLocked=true)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy