How to export Auth0 logs using custom actions

As per my project requirement, we created one micro service which accepts auth0 logs and store the data into database and SPLUNK. we know we can do this using LogStream, but due to other requirement we want to integrate my logstream microservice API into auth0 custom actions . Please suggest the approach or share if any documentation available which matches my ask.

Hi @maheshb,

Welcome to the Auth0 Community!

We suggest using Log Streams to export your tenant log events. Auth0 Actions cannot export Auth0 logs entirely, as there isn’t a method to retrieve the complete set of tenant logs. With Actions, you can only search for log events or retrieve a log event by its ID using the Management API.

Thanks,
Rueben

Thanks for the reply.

@lihua.zhang,

  • We are planning to push the logs to the microservice like exception/validations occurred within custom actions using newly created custom actions. Still we are ok for passing minimal log info from custom actions to microservice.

  • Is there any way i can pass a dynamically generated b2b token inside custom webhook created using microservice endpoint.

  • How we can exclude a personal infomration like username and mobile number while streaming the logs to splunk

Hi @maheshb,

Thanks for the reply.

Yes, I suggest calling the Management API’s Update a log stream endpoint and passing the token to the httpAuthorization property.

You won’t be able to exclude PII while streaming your logs to Splunk. You will need to scrub the exported logs of PII.

See this FAQ which explains this as well.

Thanks,
Rueben

Hey there!

As this topic is related to Actions and Rules & Hooks are being deprecated soon in favor of Actions, I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!