
ca1j8 (ca1j8) asked a question.
Hello,
I am looking for a way to pull users access. My goal is to pull the data provided below to store in our server.
Data:
- Time Logged in
- Status - Success/Fail
- Email/Username
- Additional Profile Data - including custom data
Filtered by login date/time.
Thank you in advance,
Craig Alexander

In the Okta Admin -> Reports -> System Log you be able to run various queries. In this case, the simple query would be: eventType eq "user.session.start"
Some of the return in the query will be
Time Logged in in Zulu Time - Published 2020-05-11T21:07:02.061Z
That Status you need - Result SUCCESS
The username/email - AlternateId foo@bar.baz
The users name - DisplayName Foo Bar
You can also download that query into a CSV.
You can also download the Okta Password Health Report as a CSV in Okta Admin -> Reports -> Reports
Thanks James. I was able to get the data through the Events API call. Right now, I think we are going to try running the Get users API call while using Pagnation to gather the lastLogin times for each user.
We have a custom field that we want to specifically audit that is sent from our App and I cannot filter the API call to only show users with said field.
With that said if I run the Events call to gather the ID's for each user we will need to run hundreds of separate API calls to get the custom field which will give us more details on every login, however will put a strain on resources.