Add organization information to session metadata
You can use Actions to store the organization’s identifiers in a session with the post-loginapi.session.setMetadata() method and query it with the event.session.metadata object.
Post-Login Action code:
-
In subsequent Actions, you can query the data via the
event.session.metadataobject: -
If you use the Management API, you can query the data via the /api/v2/sessions/ endpoint with
GET /api/v2/sessions/{id}. Sample response:Calls to the/api/v2/sessions/{id}endpoint require a Management API access token with theupdate:sessionscope. -
If you have an OIDC Back-Channel Logout session metadata configured application, the
logout_tokenincludes the session metadata: