<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00008j8qR3SAIOkta Classic EngineAnswered2023-12-06T13:15:03.000Z2020-06-19T09:45:45.000Z2020-06-20T00:04:28.000Z

BenjaminS.51727 (Customer) asked a question.

How to get password last changed date in an automation?

I'm setting up an automation to alert users of their impending password expiration. I'd like to put a date into the email of WHEN the password expires.

I've tried to read the passwordChanged attribute using "user.passwordChanged" in an expression in the email template, but that breaks the entire template.

 

How can I get the password last changed date?


  • sandeepk.84743 (Wipro Technologies)

    why can't you read this attribute from the directory server directly? that should be easy to fetch & automate. is there any specific requirement to use it from OKTA ?

    • BenjaminS.51727 (Customer)

      What directory server do you mean? We are using the Okta Universal Directory as our main user store. Users are provisioned there, and need to update their password there regularly. We now want to use an Automation to notify them of the password expiring soon, and want to display the date when the password expires.

  • sandeepk.84743 (Wipro Technologies)

    Ok Now I get it. well you can use the GetUser API, It gives you the User Last Password changed Time in JSON format. I hope it helps.

    Example response given below.

     

     

    {

        "id": "00u4bx1b5wHvxc4Ul357",

        "status": "ACTIVE",

        "created": "2020-06-19T09:26:31.000Z",

        "activated": "2020-06-19T09:26:31.000Z",

        "statusChanged": "2020-06-19T09:26:31.000Z",

        "lastLogin": null,

        "lastUpdated": "2020-06-19T10:37:06.000Z",

        "passwordChanged": "2020-06-19T10:37:06.000Z",

        "type": {

            "id": "oty11hoh4jvUxxZvV357"

        },

        "profile": {

            "firstName": "joe",

            "lastName": "patel",

            "mobilePhone": null,

            "secondEmail": null,

            "login": "joepatel@test.com",

            "email": "joepatel@test.com"

        },

        "credentials": {

            "password": {},

            "emails": [

                {

                    "value": "joepatel@test.com",

                    "status": "VERIFIED",

                    "type": "PRIMARY"

                }

            ],

            "provider": {

                "type": "OKTA",

                "name": "OKTA"

            }

        },

    }

     

    Expand Post
    • BenjaminS.51727 (Customer)

      We want to get rid of our on-prem systems entirely, wouldn't make much sense to spin up VMs just to do email sending.

      However, it might be necessary to do it, the automation system of Okta leaves a lot to be desired at the moment.

       

      Thank you for your help!

      Expand Post
This question is closed.
Loading
How to get password last changed date in an automation?