Skip to content

@salesforce/b2c-tooling-sdk / operations/users / GrantRoleOptions

Interface: GrantRoleOptions ​

Defined in: packages/b2c-tooling-sdk/src/operations/users/index.ts:101

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

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

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

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


userId ​

userId: string

Defined in: packages/b2c-tooling-sdk/src/operations/users/index.ts:103

User ID

Released under the Apache-2.0 License.