Session Metadata allows you to attach custom key–value data to a user's session using Actions or the Auth0 Management API. This enables you to persist contextual data throughout the session lifecycle, powering richer integrations, stronger audit trails, and personalized session behavior.
api.session.setMetadata(key, value) and event.session.metadataGET and PATCH on /api/v2/sessions/{id}api.session.deleteMetadata(key) or evict all metadata with api.session.evictMetadata()exports.onExecutePostLogin = async (event, api) => {
api.session.setMetadata("deviceName", event.request.user_agent);
api.session.setMetadata("loginRegion", event.request.geoip?.countryCode);
api.session.setMetadata("orgContext", event.organization?.id);
};
Session Metadata is now Generally Available for all Enterprise tenants.
No API or behavior changes from Early Access.
Fetched April 11, 2026