Skip to main content

Auth payload

When your app is embedded in Atlan (sidebar or asset profile tab), the product sends an ATLAN_AUTH_CONTEXT message to the iframe with a JWT token, the signed-in user, and the current page context. Your app uses this payload to call Atlan APIs and to know which asset is in view when it's rendered as an asset profile tab.

This reference documents the payload structure, field names, and types. Use it to look up token, user, and page fields and to interpret route parameters such as the asset GUID in page.params.id. For how to receive the message (SDK or manual postMessage), see Embed your app. For message types and handshake flow, see Send and receive messages.

Payload fields

tokenstring
Required

JWT access token for Atlan API calls.

expiresAtnumber
Required

Token expiration time (Unix seconds).

Example:1738511234

userobject
Required

Logged-in user identity.

pageobject
Required

Current route context. When your app is an asset profile tab, page.params.id is the asset GUID.

timestampnumber
Required

Message timestamp (Unix milliseconds).

Example:1738507634789

user

user.idstring
Required

User identifier.

Example:user-guid

user.usernamestring
Required

Username.

Example:john.doe

user.emailstring
Required

Email address.

user.namestring
Required

Display name.

Example:John Doe

page

page.routestring
Required

Current route path.

Example:/assets/abc-123

page.paramsRecord<string, string | string[]>
Required

Route parameters. When your app is an asset profile tab, params.id is the asset GUID.

Example:{ "id": "abc-123" }

page.queryRecord<string, string | string[]>
Required

Query parameters.

Example:{}

Example payload

{
type: 'ATLAN_AUTH_CONTEXT',
payload: {
token: 'eyJhbGciOi...',
expiresAt: 1738511234,
user: {
id: 'user-guid',
username: 'john.doe',
email: '[email protected]',
name: 'John Doe'
},
page: {
route: '/assets/abc-123',
params: { id: 'abc-123' },
query: {}
},
timestamp: 1738507634789
}
}

Asset profile tab

When your app renders in the asset-profile-tab slot, page.params.id contains the asset GUID. Use it to fetch the asset:

const assetGuid = context.page?.params?.id
const asset = await atlan.api.get(`/api/meta/entity/guid/${assetGuid}`)

See also