---
editLink: false
lastUpdated: false
outline: [2, 3]
---

<!-- Generated by python/b2c-tooling-sdk/scripts/generate_api_docs.py. Do not edit. -->

# b2c_tooling_sdk.operations.roles

Account Manager role management operations.

Mirrors `src/operations/roles/index.ts`. Provides high-level functions for
retrieving role information in Account Manager, including listing roles and
getting role details.

## Core Role Functions

- [`get_role`](/python/api/clients#get-role) -- Get role details by ID
- [`list_roles`](/python/api/clients#list-roles) -- List roles with pagination

## Usage

```python
from b2c_tooling_sdk.operations.roles import get_role, list_roles, ListRolesOptions
from b2c_tooling_sdk.clients import create_account_manager_roles_client
from b2c_tooling_sdk.auth import OAuthStrategy

auth = OAuthStrategy(client_id="your-client-id", client_secret="your-client-secret")
client = create_account_manager_roles_client(config, auth)

# Get a role by ID
role = await get_role(client, "bm-admin")

# List roles
roles = await list_roles(client, ListRolesOptions(size=25, page=0))

# List roles filtered by target type
user_roles = await list_roles(client, ListRolesOptions(size=25, page=0, role_target_type="User"))
```
## Authentication

Role operations require OAuth authentication with appropriate Account Manager permissions.

## Re-exports

Also exported from this module; documented elsewhere:

- [`AccountManagerRole`](/python/api/clients#accountmanagerrole)
- [`ListRolesOptions`](/python/api/clients#listrolesoptions)
- [`RoleCollection`](/python/api/clients#rolecollection)
- [`get_role`](/python/api/clients#get-role)
- [`list_roles`](/python/api/clients#list-roles)
