
## Auth payload

URL: https://docs.atlan.com/product/capabilities/build-apps/references/auth-context

> Token, user identity, and page in ATLAN_AUTH_CONTEXT (for example, asset GUID in page.params).

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](https://docs.atlan.com/llms/platform/build-apps/embed-in-atlan/llms.txt). For message types and handshake flow, see [Send and receive messages](https://docs.atlan.com/llms/platform/build-apps/postmessage-reference/llms.txt).

## Payload fields

### `user`

### `page`

"
 required={true}
 description="Route parameters. When your app is an asset profile tab, params.id is the asset GUID."
 example='{ "id": "abc-123" }'
/>

"
 required={true}
 description="Query parameters."
 example="{}"
/>

### Example payload

```ts
{
 type: 'ATLAN_AUTH_CONTEXT',
 payload: {
 token: 'eyJhbGciOi...',
 expiresAt: 1738511234,
 user: {
 id: 'user-guid',
 username: 'john.doe',
 email: 'john.doe@company.com',
 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:

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

## See also

- [Embed your app](https://docs.atlan.com/llms/platform/build-apps/embed-in-atlan/llms.txt): Set up embedding and receive this payload
- [Send and receive messages](https://docs.atlan.com/llms/platform/build-apps/postmessage-reference/llms.txt): Message types and when ATLAN_AUTH_CONTEXT is sent

---
