Beta.Users

August 13, 2026 ยท View on GitHub

Overview

Available Operations

get_identity

Get Identity

Example Usage

from mistralai.client import Mistral, models
import os


with Mistral() as mistral:

    res = mistral.beta.users.get_identity(security=models.UsersAPIGetIdentitySecurity(
        dashboard_user_context_auth=os.getenv("MISTRAL_DASHBOARD_USER_CONTEXT_AUTH", ""),
    ))

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescription
securitymodels.UsersAPIGetIdentitySecurity:heavy_check_mark:The security requirements to use for the request.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.UserIdentity

Errors

Error TypeStatus CodeContent Type
errors.SDKError4XX, 5XX*/*

list_organizations

List every organization the authenticated user is a member of.

Identity-only: the caller need not have selected an organization, so this reads only the user and never scopes by the active org.

Example Usage

from mistralai.client import Mistral, models
import os


with Mistral() as mistral:

    res = mistral.beta.users.list_organizations(security=models.UsersAPIListOrganizationsSecurity(
        dashboard_user_context_auth=os.getenv("MISTRAL_DASHBOARD_USER_CONTEXT_AUTH", ""),
    ), offset=0, limit=100)

    while res is not None:
        # Handle items

        res = res.next()

Parameters

ParameterTypeRequiredDescriptionExample
securitymodels.UsersAPIListOrganizationsSecurity:heavy_check_mark:N/A
offsetOptional[int]:heavy_minus_sign:Number of organizations to skip before returning results.0
limitOptional[int]:heavy_minus_sign:Maximum number of organizations to return.100
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.UsersAPIListOrganizationsResponse

Errors

Error TypeStatus CodeContent Type
errors.SDKError4XX, 5XX*/*

list_workspaces

List every workspace the authenticated user is a member of, across all their organizations, each tagged with the organization it belongs to.

Example Usage

from mistralai.client import Mistral, models
import os


with Mistral() as mistral:

    res = mistral.beta.users.list_workspaces(security=models.UsersAPIListWorkspacesSecurity(
        dashboard_user_context_auth=os.getenv("MISTRAL_DASHBOARD_USER_CONTEXT_AUTH", ""),
    ), organization_id="1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d", offset=0, limit=100)

    while res is not None:
        # Handle items

        res = res.next()

Parameters

ParameterTypeRequiredDescriptionExample
securitymodels.UsersAPIListWorkspacesSecurity:heavy_check_mark:N/A
organization_idOptionalNullable[str]:heavy_minus_sign:Return only workspaces belonging to this organization.1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d
offsetOptional[int]:heavy_minus_sign:Number of workspaces to skip before returning results.0
limitOptional[int]:heavy_minus_sign:Maximum number of workspaces to return.100
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.UsersAPIListWorkspacesResponse

Errors

Error TypeStatus CodeContent Type
errors.SDKError4XX, 5XX*/*