<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
0D50Z00008G7UstSAFOkta Classic EngineIntegrationsAnswered2025-10-19T09:00:50.000Z2018-02-27T11:39:14.000Z2018-03-13T00:12:46.000Z
  • Hi Javier,

     

    To retrieve the last login for an app you can utilise our events API which is documented here: 

    https://developer.okta.com/docs/api/resources/events

     

    Action Object types you will find the required parameters for your search scope. 

    However you won't be able to sort the results whereby most recent is displayed firts as such you will need to utilise the published parameter to define a time frame i.e. greater than 1st Feb 2018. 

     

    The following query I used in the Postman application.

    {{url}}/api/v1/events?limit=100&filter=action.objectType eq "app.auth.sso" and target.id eq "{{appId}}" and published gt "2018-02-10T00:00:00.000Z"

     

    This will return results 100 results per page and filters based on the application authentication for the target app that occurred after the 1st Feb 2018. 

     

    Alterantively you can use the system log and filter based on the application ID and the event type, this can also be exported to CSV. 

     

    I hope the above information is helpful!
    Expand Post
  • j5v7c (j5v7c)

    Hello,

     

    Thanks for posting your inquiry in Okta Community Portal.

     

    ​If you receive a great answer to your question(s), please help readers find it by marking it the best answer. Hover over the answer and click "Best Answer." 

     

    Thank you,

     

    ​Dylann Fezeu

    OHC Team
    Expand Post
This question is closed.
Loading
How to know last sign-on App via API?