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-- Get role details by IDlist_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: