+ Start a Discussion

Get amount of time until password expires...

I wanted to make something that reported how many days a user has left before their password expires.  I found the LastPasswordChangeDate field on the User table.  Now I was just wondering if there was anywhere I could pull down the org's policy on "User passwords expire in" programatically? 




As of now, i have never seen any object which stores this kind of information and is available for Apex.


No, most of the "Org" data you find in Company Information isn't available via API at this time.  For me, it's unbelievable that at least number of licenses used and limited to are not exposed.


That said, an easy way around this might be to create a Custom Setting for the same value as the Org setting and then just access it.  Then make sure your System Admin changes the custom setting if/when they change the Org Setting.