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
camelUsercamelUser 

SOQL Advanced User Details

How do i access the infomation on the Advanced User Detailspage via SOQL? i cant see any object that contains the data i am looking for, the user object does not seem to contain the 'Last Password Change or Reset' field.

The user object does conatin the field PasswordResetLockoutDate however when attempting to grab this value i get the error:

 

"No such column 'LastPasswordChangeOrReset' on entity 'User'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."

Khan AnasKhan Anas (Salesforce Developers) 
Hi,

Greetings to you!

The API name of Last Password Change or Reset is LastPasswordChangeDate which will tell you the date and time of the user’s last password change or reset. This read-only field appears only for users with the Manage Users permission.

You can query like this:
SELECT LastPasswordChangeDate FROM User

Please refer to the below links which might help you further.

https://developer.salesforce.com/docs/atlas.en-us.sfFieldRef.meta/sfFieldRef/salesforce_field_reference_User.htm

https://help.salesforce.com/articleView?id=user_fields.htm&type=5

https://salesforce.stackexchange.com/questions/68784/list-of-user-fields-not-available-in-apex

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas