<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
0D54z00007RVF5QCAXOkta Classic EngineAdministrationAnswered2026-04-03T09:00:15.000Z2022-02-11T16:27:43.000Z2022-02-14T16:35:13.000Z

mqf9b (mqf9b) asked a question.

Fetch the account.Expires attribute from AD over to Okta

Hello

 

How it is possible to fetch the account.Expires attribute from AD over in Okta?

We do provision from AD to OKTA at moment and like to be able to fetch the account expiry date as well.

 

Within the Profile Editor in Okta, there is no such an option.

I created the field in Okta and unsure what the expression would be:

 

Image is not available

 

Would somebody be able to assist?


TravisW.16503 likes this.
  • mqf9b (mqf9b)

    Managed to work around it ... had to add the AccountExpires attribute via the Profile Editor in Okta. Now the next question is: how do I leave blank on those accounts that have no expiry date? Currently it seems to put some random dates like 01/01/1601 although it is set to never in AD.

     

    Using the following:

     

    Time.fromIso8601ToString(Time.fromWindowsToIso8601(appuser.accountExpires),"dd/MM/YYYY")

    fx

     

    Expand Post
  • ojovp (ojovp)

    Hello @mqf9b (mqf9b)​ 

    I hope you are having a great day

     

    Thank you for posting, I can think of implementing this in the following way :

    1. Setup a custom attribute called as "End Date" or "Expiration Date.
    2. You will need to setup a custom daily job which does API calls to all active user profiles and check expiration date and send out emails where ever applicable. This can be achieved via Okta Workflows too. 

     

    If you need further assistance you can also feel free to post this question on our Okta Developer Forums: https://devforum.okta.com, this is a place for the Okta developer community to interact.

     

    Have a great day ahead

     

    Henry E.

    Okta Inc

     

    Expand Post
    • mqf9b (mqf9b)

      You seem to give this response to every user 🙂

      I managed to assigned the right mapping.. now the only problem is that the Expiry Date is not being pulled from AD to OKTA profile. Although I run a import from AD to OKTA.

       

       

      Any ideas?

      Expand Post
This question is closed.
Loading
Fetch the account.Expires attribute from AD over to Okta