
User16865435103567274171 (Customer) asked a question.
I am working on a use case to fetch system logs from the Okta API's.
I need some guidance here to decide which one out the below is the best approach to do that :
a. Use the SSWS token with "Report Administrator"
b. Use Implement OAuth for Okta with a service app as explained here https://developer.okta.com/docs/guides/implement-oauth-for-okta-serviceapp/main/*use-the-client-credentials-grant-flow
Please advise which is the best and preferred way ?

Hi! Are you utilizing a tool like Splunk or doing this individually like using Postman or Python? In my experience, it may be best practice to generate an API token using a read-only administrator, then take that token and use it in any of the above solutions. That is generally the most straight-forward, and without any context on your specific requirements, is probably the easiest. Do keep in mind that these keys are very important, and they should be protected as such just like any password would be. If using in a script or something, be sure to use environment variables to better protect them. You can also monitor the API keys usage from within the Okta Admin console as well.
Please let me know if you have any questions or concerns. Thanks!
No, I am not using any tool like splunk.
It's a native backend service which we are using to pull logs from Okta API's.
Both the approach's have it's own pro's and con's.
I wanted to take inputs from the experts to know which is the most preferred way used by the customers to do this.
Hi @User16865435103567274171 (Customer) , Thank you for reaching out to the Okta Community!
We don't have any best practice guide for this situation or any customer usage report that would indicate the preferred way.
My advice would be to reach out to the dedicated Developer Forum devforum.okta.com to take advantage of their expertise.
In the meantime, we'll leave this question open here as well for additional input from the community.
If my answers helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you.
Hope my answer helps!
--------------------------------
Coming soon: Get tips from community managers during Okta Community's first Ask Me Anything event on 6/22