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

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/users](../index.md) / GrantRoleOptions

# Interface: GrantRoleOptions

Defined in: [packages/b2c-tooling-sdk/src/operations/users/index.ts:101](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/operations/users/index.ts#L101)

Options for granting a role.

The AM API uses mixed formats: role IDs (e.g. 'bm-admin') in the `roles` array,
and roleEnumNames (e.g. 'ECOM_ADMIN') in the `roleTenantFilter` string.
Both must be provided. Use `resolveToInternalRole` / `resolveFromInternalRole` to convert.

## Properties

### role

> **role**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/users/index.ts:105](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/operations/users/index.ts#L105)

Role ID as used in the roles array (e.g. 'bm-admin').

***

### roleEnumName

> **roleEnumName**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/users/index.ts:107](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/operations/users/index.ts#L107)

Role enum name as used in roleTenantFilter (e.g. 'ECOM_ADMIN').

***

### scope?

> `optional` **scope**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/users/index.ts:109](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/operations/users/index.ts#L109)

Optional scope for the role (tenant IDs, comma-separated)

***

### userId

> **userId**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/users/index.ts:103](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/operations/users/index.ts#L103)

User ID
