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

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

# Function: extractJwtScopes()

> **extractJwtScopes**(`payload`): `string`[]

Defined in: [packages/b2c-tooling-sdk/src/auth/jwt-utils.ts:22](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/d7ff38c7ca2b1411cd718b9554500c9416f00266/packages/b2c-tooling-sdk/src/auth/jwt-utils.ts#L22)

Extract `scope` from a decoded JWT payload. Tolerates both the (legacy)
space-delimited string form and the array form.

## Parameters

### payload

`Record`\<`string`, `unknown`\>

## Returns

`string`[]
