Skip to content
View as Markdown
View as Markdown

@salesforce/b2c-tooling-sdk / operations/roles

operations/roles

Account Manager role management operations.

This module provides high-level functions for retrieving role information in Account Manager, including listing roles and getting role details.

Core Role Functions

Usage

typescript
import {getRole, listRoles} from '@salesforce/b2c-tooling-sdk/operations/roles';
import {createAccountManagerRolesClient} from '@salesforce/b2c-tooling-sdk/clients';
import {OAuthStrategy} from '@salesforce/b2c-tooling-sdk/auth';

const auth = new OAuthStrategy({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
});

const client = createAccountManagerRolesClient({}, auth);

// Get a role by ID
const role = await getRole(client, 'bm-admin');

// List roles
const roles = await listRoles(client, {size: 25, page: 0});

// List roles filtered by target type
const userRoles = await listRoles(client, {size: 25, page: 0, roleTargetType: 'User'});

Authentication

Role operations require OAuth authentication with appropriate Account Manager permissions.

References

AccountManagerRole

Re-exports AccountManagerRole


getRole

Re-exports getRole


listRoles

Re-exports listRoles


ListRolesOptions

Re-exports ListRolesOptions


RoleCollection

Re-exports RoleCollection

Released under the Apache-2.0 License.