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

[@salesforce/b2c-tooling-sdk](../../modules.md) / [clients](../index.md) / getRole

# Function: getRole()

> **getRole**(`client`, `roleId`): `Promise`\<\{ \}\>

Defined in: [packages/b2c-tooling-sdk/src/clients/am-api.ts:586](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/clients/am-api.ts#L586)

Retrieves details of a role by ID.

## Parameters

### client

[`AccountManagerRolesClient`](../type-aliases/AccountManagerRolesClient.md)

Account Manager Roles client

### roleId

`string`

Role ID

## Returns

`Promise`\<\{ \}\>

Role details

## Throws

Error if role is not found or request fails
