Skip to main content
Session Metadata is currently in Early Access for Enterprise customers only. By using this feature, you agree to the applicable Free Trial terms in Okta’s Master Subscription Agreement. To learn more about Auth0’s product release cycle, read Product Release Stages.
Session metadata makes the user context data portable and visible across the session lifecycle and in logout events. Downstream systems can use session metadata information to conduct audits, perform analytics, and apply revocation pipelines, among other uses.

Add organization information to session metadata

You can use Actions to store the organization’s identifiers in a session with the post-login api.session.setMetadata() method and query it with the event.session.metadata object. Post-Login Action code:
The session metadata is available for subsequent Actions, retrievable via the Management API and can be included in the OpenID Connect Back-Channel Logout token.
  • In subsequent Actions, you can query the data via the event.session.metadata object:
  • If you use the Management API, you can query the data via the /api/v2/sessions/ endpoint:
Sample response:
Calls to the /api/v2/sessions/{id} endpoint require a Management API access token with the update:session scope.