Adding Request Headers to Logs

Overview

This article explains whether it is possible to have custom headers, such as device identifiers, available in tenant logs for tracking purposes.

Applies To

  • Tenant Logs

Solution

It is not currently possible to send custom headers that are visible in tenant logs. The logs follow the schemas detailed in Auth0 Log Schemas.

Some alternatives are:

  1. Send the custom header as a custom query parameter in /authorize requests. This would be visible in some Action triggers, such as post-login, via the event.request.query object.
    • Certain other standard headers are also available in the event.request object. Refer to the Post Login Event Object for the post-login trigger for an example.
    • To use custom query parameters with New Universal Login page templates, they need to be prefixed with “ext-”. See Custom Query Parameters for more information.
  2. Use a self-managed custom domain. This supports a reverse proxy setup, allowing all traffic to the custom domain to flow through the reverse proxy. This setup allows inspection of traffic sent to Auth0 in detail from the proxy’s logs and enables additional rules to be applied on outgoing traffic.