---
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:593](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/d9cf11cf4a11828e783aed6313f5ea49990488ff/packages/b2c-tooling-sdk/src/clients/am-api.ts#L593)

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
