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

[@salesforce/b2c-tooling-sdk](../../modules.md) / 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

- [getRole](../../clients/functions/getRole.md) - Get role details by ID
- [listRoles](../../clients/functions/listRoles.md) - List roles with pagination

## 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](../../clients/type-aliases/AccountManagerRole.md)

***

### getRole

Re-exports [getRole](../../clients/functions/getRole.md)

***

### listRoles

Re-exports [listRoles](../../clients/functions/listRoles.md)

***

### ListRolesOptions

Re-exports [ListRolesOptions](../../clients/interfaces/ListRolesOptions.md)

***

### RoleCollection

Re-exports [RoleCollection](../../clients/type-aliases/RoleCollection.md)
