---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [auth](../index.md) / readAccountManagerClaims

# Function: readAccountManagerClaims()

> **readAccountManagerClaims**(`accessToken`): [`AccountManagerClaims`](../interfaces/AccountManagerClaims.md)

Defined in: [packages/b2c-tooling-sdk/src/auth/account-manager-claims.ts:189](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/d7ff38c7ca2b1411cd718b9554500c9416f00266/packages/b2c-tooling-sdk/src/auth/account-manager-claims.ts#L189)

Decode an Account Manager access token and read its identity, roles and
tenant filter.

This only decodes the token; the signature is not verified. Use the result as
a hint (for example, to decide whether to offer "Create an API client"), and
treat the API's response as authoritative.

## Parameters

### accessToken

`string`

Account Manager access token (JWT)

## Returns

[`AccountManagerClaims`](../interfaces/AccountManagerClaims.md)

## Throws

Error if the token is not a decodable JWT

## Example

```typescript
import {readAccountManagerClaims, isAccountManagerApiClientAdmin} from '@salesforce/b2c-tooling-sdk/auth';

const {accessToken} = await strategy.getTokenResponse();
const claims = readAccountManagerClaims(accessToken);
if (isAccountManagerApiClientAdmin(claims)) {
  // offer to create an API client, letting the user pick from claims.tenants
}
```
