<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
0D54z0000AIdvyBCQROkta Classic EngineInsights and ReportingAnswered2025-03-30T09:14:57.000Z2025-01-09T17:03:12.000Z2025-01-31T16:45:07.000Z

kt284 (kt284) asked a question.

How to Retrieve Monthly Unique Logins Efficiently and Automate Reporting

Hi Okta Community,

I’m trying to find an efficient way to retrieve the total number of unique users who log in to our Okta instance each month. Currently, I’m using the /api/v1/logs endpoint with a filter for eventType eq "user.session.start". From there, I process the results to count distinct user IDs. However, this approach has a few challenges: the volume of logs is massive, leading to frequent rate limit errors (HTTP 429), and the need to handle pagination makes the process slow and resource-intensive.

I’m looking for a better solution. Ideally, I’d like to automate this reporting so that the data is pulled and aggregated monthly without requiring manual intervention. Is there a way to achieve this more efficiently, either through a different Okta API, a built-in reporting feature, or perhaps an integration with another tool?

I’d also be interested to know if there’s a way to request pre-aggregated data from Okta, as parsing logs for unique logins seems like a very common use case. If anyone has faced similar challenges or implemented a successful automated solution, I’d love to hear your advice or best practices.

Thanks in advance for your help and insights!

 

Regards!


kt284 likes this.
  • MatthewH.10249 (State of Iowa)

    Perhaps you could use an Okta event hook to call an Okta Workflow and save the unique user records to a Workflow table. Keep in mind there is a limit on then umber of rows the table can hold. I think is is 100k. Another option is to configure your logs to be sent to an SEIM like Sumo or Splunk and then use their scripting services to collect and send you the report. Monthly, I have a query in Sumo that returns the number of successful logins per app. This would have very similar performance issues that you are reporting if I had done in Okta.

     

    That being said, I do see Okta now has a report on the Okta Admin Dashboard named "App sign-in data" that provides similar data as to what my Sumo query returns so maybe you could post to Okta Ideas (https://support.okta.com/help/s/ideas) and request the report you are wanting and they might build it into Okta so you don't have to develop anything. If you try to go this route please post a link to your Idea so others that see this this community post can upvote it if they want the report as well.

    Expand Post
    Selected as Best
  • MatthewH.10249 (State of Iowa)

    Perhaps you could use an Okta event hook to call an Okta Workflow and save the unique user records to a Workflow table. Keep in mind there is a limit on then umber of rows the table can hold. I think is is 100k. Another option is to configure your logs to be sent to an SEIM like Sumo or Splunk and then use their scripting services to collect and send you the report. Monthly, I have a query in Sumo that returns the number of successful logins per app. This would have very similar performance issues that you are reporting if I had done in Okta.

     

    That being said, I do see Okta now has a report on the Okta Admin Dashboard named "App sign-in data" that provides similar data as to what my Sumo query returns so maybe you could post to Okta Ideas (https://support.okta.com/help/s/ideas) and request the report you are wanting and they might build it into Okta so you don't have to develop anything. If you try to go this route please post a link to your Idea so others that see this this community post can upvote it if they want the report as well.

    Expand Post
    Selected as Best

Loading
How to Retrieve Monthly Unique Logins Efficiently and Automate Reporting