MCP ScannerCustom audit
All servers

okta/okta-mcp-server

Okta Self-Hosted MCP Server

Packageokta-mcp-server
Version1.1.8 in pyproject.toml
PublisherOkta Official
MCP Registrynot listed
Scanned2026-11-25
Scannerv1.3.0
Methodologyv1.2
Stars 80Forks 72Last push 2026-11-02
Python 100.0%by source files the scanner reads
Code safetypartly tracedExposure5.7Prompts10.0Supply chain7.0Secrets10.0Transparency10.0
Analysis confidence90%
How much of the server the scanner could read: tools analyzed, files parsed, limits hit.
Code Safetypartly traced—

Paths from tool input into commands, SQL, files and URLs

Capability Exposure5.7/10Fair

How much power the tools give an agent over the machine

Prompt Integritynothing published yet10.0/10

Hidden instructions and poisoning in text for the model

Supply Chain7.0/10Fair

Known vulnerabilities in the packages the server uses

Secrets & Credentialsnothing published yet10.0/10

How the server reads credentials and where they can go

Behavior Transparencynothing published yet10.0/10

Whether the tools do only what their descriptions say

How far the analysis went

The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.

  • In 85 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
  • 1 of 114 tools, prompts and resources could not be followed through the code

Top risks in plain words

  • HIGHTool export_users_csv reads or writes any file path by design: an agent steered by prompt injection can use it that way.

How to use it safely

Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.

  • Give it only the folder it needs

    export_users_csv can read or write any file path. Mount a single project folder, read-only where you can.

  • Turn off the tools you do not use

    Most MCP clients let you disable single tools. If you do not need export_users_csv, switch them off.

  • Give it a narrowly scoped token

    Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.

  • Keep confirmations on

    Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.

What its tools can do on your machine

The server offers 114 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.

Read or write filesopen, create, change or delete files
export_users_csv, upload_brand_theme_background_image, upload_brand_theme_favicon, upload_brand_theme_logo, upsert_custom_domain_certificate
5 of 114
Connect to the internet or other hostssend requests or open connections
get_login_failures
1 of 114
Read passwords, tokens or keysload secrets such as API keys
upload_brand_theme_background_image, upload_brand_theme_favicon, upload_brand_theme_logo, upsert_custom_domain_certificate
4 of 114
Touch sensitive locationssuch as ~/.ssh, cloud credentials or browser data
upload_brand_theme_background_image, upload_brand_theme_favicon, upload_brand_theme_logo, upsert_custom_domain_certificate
4 of 114

No tool was seen to: start other programs on the machine; read environment variables.

Where its requests and secrets go

Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.

Hosts written in the code

The literal addresses the tools' requests name.

  • None: no request names a fixed host.
Addresses from settings

Constants or settings that start an address; the value comes from configuration.

  • None seen.
Secrets it reads

Credential-like environment variables. Give the server a key with the least access it needs.

  • None: no credential-like variable is read by the tools.

Text it brings in from outside

Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.

  • files5 tools · export_users_csv, upload_brand_theme_background_image, upload_brand_theme_favicon +2

Tool annotations

No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.

Tools, prompts and resources (114: 114 tools)

Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.

export_users_csvtool Fetch all users from the Okta organization and save them to a CSV file on disk.Filesoutside textReads/writes files
Fetch all users from the Okta organization and save them to a CSV file on disk.

    Uses the same pagination logic as list_users (fetch_all=True) but writes results
    directly to a CSV file instead of returning them, avoiding response size limits.

    Parameters:
        output_path (str): Absolute path where the CSV file will be written.
            Defaults to /tmp/okta_users_export.csv.
        search (str, optional): Search expression for filtering users.
        filter (str, optional): Filter string for users.
        q (str, optional): Query string for users.

    Returns:
        Dict containing:
        - output_path: Path to the written CSV file
        - total_users: Total number of users written
        - pages_fetched: Number of pages fetched
        - stopped_early: Whether pagination hit the page cap
        - stop_reason: Reason pagination stopped (if stopped_early)
activate_applicationtool Activate an application in the Okta organization.
Activate an application in the Okta organization.

    Parameters:
        app_id (str, required): The ID of the application to activate

    Returns:
        List containing the result of the activation operation.
activate_policytool Activate a policy.
Activate a policy.

    Parameters:
        policy_id (str, required): The ID of the policy to activate.

    Returns:
        Dict with success status.
activate_policy_ruletool Activate a policy rule.
Activate a policy rule.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_id (str, required): The ID of the rule to activate.

    Returns:
        Dict with success status.
add_user_to_grouptool Add a user to a group by ID in the Okta organization.
Add a user to a group by ID in the Okta organization.

    This tool adds a user to a group by its ID in the Okta organization.

    Parameters:
        group_id (str, required): The ID of the group to add the user to.
        user_id (str, required): The ID of the user to add to the group.

    Returns:
        List containing the result of the addition operation.
confirm_delete_applicationtool Confirm and execute application deletion after receiving confirmation.
Confirm and execute application deletion after receiving confirmation.

    .. deprecated::
        This tool exists for backward compatibility with clients that do not
        support MCP elicitation.  New clients should rely on the built-in
        elicitation prompt in ``delete_application`` instead.

    This function MUST ONLY be called after the human user has explicitly typed 'DELETE' as confirmation.
    NEVER call this function automatically after delete_application.

    Parameters:
        app_id (str, required): The ID of the application to delete
        confirmation (str, required): Must be 'DELETE' to confirm deletion

    Returns:
        List containing the result of the deletion operation.
confirm_delete_grouptool Confirm and execute group deletion after receiving confirmation.
Confirm and execute group deletion after receiving confirmation.

    .. deprecated::
        This tool exists for backward compatibility with clients that do not
        support MCP elicitation.  New clients should rely on the built-in
        elicitation prompt in ``delete_group`` instead.

    This function MUST ONLY be called after the human user has explicitly typed 'DELETE' as confirmation.
    NEVER call this function automatically after delete_group.

    Parameters:
        group_id (str, required): The ID of the group to delete.
        confirmation (str, required): Must be 'DELETE' to confirm deletion.

    Returns:
        List containing the result of the deletion operation.
create_applicationtool Create a new application in the Okta organization.
Create a new application in the Okta organization.

    Parameters:
        app_config (dict, required): The application configuration including name, label, signOnMode, settings, etc.
        activate (bool, optional): Execute activation lifecycle operation after creation. Defaults to True.

    Returns:
        Dictionary containing the created application details or error information.
create_brandtool Create a new brand in the Okta organization.
Create a new brand in the Okta organization.

    A brand controls the look-and-feel of the sign-in page, error pages,
    email templates, and the End-User Dashboard.  After creation you can
    customise it further with ``replace_brand`` and the Themes API.

    Parameters:
        name (str, required): Display name for the new brand.
            Must be unique within the org.
            The reserved name ``DRAPP_DOMAIN_BRAND`` is not allowed.

    Returns:
        Dict containing the newly created brand object, or an ``error`` key on failure.
create_custom_domaintool Create a new custom domain for the Okta organization.
Create a new custom domain for the Okta organization.

    After creating a domain, the response includes DNS records (TXT + CNAME)
    that you must configure at your DNS provider before calling
    ``verify_custom_domain``. Okta does not automatically verify domains.

    Parameters:
        domain (str, required): Fully qualified custom domain name.
            Example: ``"login.example.com"``
            Note: The reserved ``drapp.{orgSubdomain}.okta.com`` pattern is not allowed.
        certificate_source_type (str, required): Who manages the TLS certificate.
            - ``"MANUAL"``       – You supply the certificate via
              ``upsert_custom_domain_certificate``. DNS verification uses a
              TXT record only.
            - ``"OKTA_MANAGED"`` – Okta automatically provisions and renews
              the certificate. After DNS verification succeeds, Okta installs
              the certificate.

    Returns:
        Dict containing the newly created domain object (including DNS records
        to configure), or an ``error`` key on failure.
create_device_assurance_policytool Create a new Device Assurance Policy.
Create a new Device Assurance Policy.

    *** MANDATORY — OS VERSION ***
        If the policy requires a minimum OS version:
        a. Do NOT put osVersion inside policy_data — the tool constructs it
           from user_stated_os_version after validation.
        b. Set user_stated_os_version to the EXACT characters the user typed,
           verbatim. NEVER invent or complete the version. "12.1" and
           "12.1.0" are NOT the same — never append a patch number yourself.
        c. If user_stated_os_version is rejected, relay the error and ask:
           "What is the exact full version in X.Y.Z format?"

    Platform-specific attribute support:
        - ANDROID: name, platform, osVersion, jailbreak (false only), screenLockType
        - IOS: name, platform, osVersion, jailbreak (false only), screenLockType
        - MACOS: name, platform, osVersion, diskEncryptionType, screenLockType, secureHardwarePresent
        - WINDOWS: name, platform, osVersion, diskEncryptionType, screenLockType, secureHardwarePresent
        - CHROMEOS: name, platform, osVersion

    Parameters:
        policy_data (dict, required): The device assurance policy configuration.
            - name (str, required): The policy name.
            - platform (str, required): Target platform.
                One of: ANDROID, IOS, MACOS, WINDOWS, CHROMEOS.
            - osVersion: Do NOT include — use user_stated_os_version instead.
            - diskEncryptionType (dict, optional): Required disk encryption (MACOS, WINDOWS only).
                Format: {\"type\": \"ALL_INTERNAL_VOLUMES\"}
            - secureHardwarePresent (bool, optional): Require secure hardware (MACOS, WINDOWS only).
            - screenLockType (dict, optional): Required screen lock type (ANDROID, IOS, MACOS, WINDOWS).
                Format: {\"include\": [\"BIOMETRIC\"]} or {\"include\": [\"PASSCODE\", \"BIOMETRIC\"]}
                Note: For ANDROID, [\"PASSCODE\"] alone is not valid — must include BIOMETRIC.
            - jailbreak (bool, optional): Block jailbroken/rooted devices (IOS, ANDROID only).
                Note: Currently only accepts false value.
        user_stated_os_version (str, optional): The EXACT OS version string the user
            typed, character-for-character. Required when setting a minimum OS version.
            For ANDROID a single major version (e.g. "12") is accepted.
            For all other platforms X.Y.Z is required — X.Y alone will be rejected.

    Returns:
        Dict containing the created policy details, or an error dict.

    Scope/permission errors:
        If the Okta API returns HTTP 401/403 (commonly due to missing OAuth scopes),
        this tool returns ``{"error": "..."}``.
        In that case, present the error message verbatim and STOP — do not retry
        and do not attempt follow-up actions until scopes are fixed.
create_email_customizationtool Create a new language customization for an email template.
Create a new language customization for an email template.

    Adds a new localized variant for the specified email template.  Only one
    customization per language is allowed — creating a duplicate language
    returns a 409 Conflict error.  The first customization created for a
    template automatically becomes the default (``isDefault=True``); subsequent
    ones default to ``False``.

    The ``body`` must be valid HTML and **must** include all required Okta
    template variables for the template type.  For example, ``UserActivation``
    requires ``${activationLink}`` or ``${activationToken}``.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``, ``"ForgotPassword"``.
        language (str, required): IETF BCP 47 language tag, e.g. ``"en"``,
            ``"fr"``, ``"de"``, ``"es"``.
        subject (str, required): The email subject line.  Supports Okta
            template variables such as ``${org.name}``.
        body (str, required): Full HTML body of the email.  Must contain all
            required Okta template variables for this template type.
        is_default (bool, optional): Whether this customization is the default
            for the template.  Only one customization may be the default at a
            time; setting this to ``True`` clears the flag on any other
            customization.

    Returns:
        Dict containing the created customization (``id``, ``language``,
        ``subject``, ``body``, ``isDefault``, ``created``, ``lastUpdated``,
        ``_links``), or an ``error`` key on failure.
create_email_domaintool Create a new email domain for the Okta organization.
Create a new email domain for the Okta organization.

    After creation the response includes DNS records (one TXT record and
    three CNAME records) that you must publish at your DNS provider.  Call
    ``verify_email_domain`` once the records are live to complete setup.

    Parameters:
        brand_id (str, required): ID of the Brand to associate with this
            email domain.  Example: ``"bnd1ab2cde3fGhIJK4l5"``
        domain (str, required): The custom domain to send email from.
            Example: ``"yourcompany.com"``
        display_name (str, required): The sender name shown in email clients.
            Example: ``"Acme IT Support"``
        user_name (str, required): Local part of the sender email address
            (before the ``@``).  Example: ``"noreply"`` → ``[email protected]``
        validation_subdomain (str, optional): Subdomain prefix used for the
            mail CNAME records.  Default: ``"mail"``

    Returns:
        Dict containing the created email domain object (including
        ``dnsValidationRecords`` to configure), or an ``error`` key on
        failure.

    Note:
        Each domain name must be unique in the org — attempting to create a
        domain that already exists returns an ``E0000197`` error.
create_grouptool Create a group in the Okta organization.
Create a group in the Okta organization.

    This tool creates a new group in the Okta organization with the provided profile.

    Parameters:
        profile (dict, required): The profile of the group to create.

    Returns:
        List containing the created group details.
create_policytool Create a new policy.
Create a new policy.

    Parameters:
        policy_data (dict, required): The policy configuration containing:
            - type (str, required): Policy type (OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, ACCESS_POLICY, PROFILE_ENROLLMENT,
            POST_AUTH_SESSION, ENTITY_RISK, DEVICE_SIGNAL_COLLECTION)
            - name (str, required): Policy name
            - description (str, optional): Policy description
            - status (str, optional): ACTIVE or INACTIVE (default: ACTIVE)
            - priority (int, optional): Priority of the policy
            - conditions (dict, optional): Policy conditions
            - settings (dict, optional): Policy-specific settings

    Returns:
        Dict containing the created policy details.
create_policy_ruletool Create a new rule for a policy.
Create a new rule for a policy.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_data (dict, required): The rule configuration containing:
            - name (str, required): Rule name
            - priority (int, optional): Priority of the rule
            - status (str, optional): ACTIVE or INACTIVE
            - conditions (dict, optional): Rule conditions
            - actions (dict, optional): Rule actions

    Returns:
        Dict containing the created rule details.
create_usertool Create a user in the Okta organization.
Create a user in the Okta organization.

    This tool creates a new user in the Okta organization with the provided profile.

    Parameters:
        profile (dict, required): The profile of the user to create.
        activate (bool, optional): Whether to activate the user immediately after creation.
            Set to False to create the user in STAGED status (no activation email sent).
            Default: True.

    Examples:
        # Create user with immediate activation (default)
        result = await create_user(profile=user_profile)

        # Create user in STAGED status (no activation email)
        result = await create_user(profile=user_profile, activate=False)

    Returns:
        List containing the created user details.
deactivate_applicationtool Deactivate an application in the Okta organization.
Deactivate an application in the Okta organization.

    Parameters:
        app_id (str, required): The ID of the application to deactivate

    Returns:
        List containing the result of the deactivation operation.
deactivate_policytool Deactivate a policy.
Deactivate a policy.

    The user will be asked for confirmation before the deactivation proceeds.

    Parameters:
        policy_id (str, required): The ID of the policy to deactivate.

    Returns:
        Dict with success status.
deactivate_policy_ruletool Deactivate a policy rule.
Deactivate a policy rule.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_id (str, required): The ID of the rule to deactivate.

    Returns:
        Dict with success status.
deactivate_usertool Deactivates a user from the Okta organization.
Deactivates a user from the Okta organization.

    This tool deactivates a user from the Okta organization by their ID.
    The user will be asked for confirmation before the deactivation proceeds.
    Deactivating the user is a prerequisite for deleting the user.

    Parameters:
        user_id (str, required): The ID of the user to deactivate.

    Returns:
        List containing the result of the deactivation operation.
delete_all_email_customizationstool Delete ALL customizations for an email template.
Delete ALL customizations for an email template.

    Permanently removes every language variant from the specified email
    template, reverting it to Okta's built-in default content.  This is
    irreversible and cannot be undone.  Requires explicit confirmation.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name whose
            customizations will all be deleted, e.g. ``"UserActivation"``.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
delete_applicationtool Delete an application by ID from the Okta organization.
Delete an application by ID from the Okta organization.

    This tool deletes an application by its ID from the Okta organization.
    The user will be asked for confirmation before the deletion proceeds.

    Parameters:
        app_id (str, required): The ID of the application to delete

    Returns:
        List containing the result of the deletion operation.
delete_brandtool Delete a brand by its ID.
Delete a brand by its ID.

    The user is asked to confirm before the deletion is carried out.
    The default (Okta) brand cannot be deleted — the API will return a 409
    error in that case.

    Parameters:
        brand_id (str, required): The unique identifier of the brand to delete.

    Returns:
        Dict with a ``message`` key on success, or an ``error`` key on failure.
delete_brand_theme_background_imagetool Delete the background image for a theme.
Delete the background image for a theme.

    After deletion the theme no longer has a background image. Touchpoint
    variants that referenced ``BACKGROUND_IMAGE`` will fall back to their
    default appearance. This operation is reversible — you can re-upload a
    background image at any time.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.

    Returns:
        Dict with a ``message`` key on success, or an ``error`` key on failure.
delete_brand_theme_favicontool Delete the custom favicon for a theme.
Delete the custom favicon for a theme.

    After deletion the theme falls back to the default Okta favicon. This
    operation is reversible — you can re-upload a favicon at any time.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.

    Returns:
        Dict with a ``message`` key on success, or an ``error`` key on failure.
delete_brand_theme_logotool Delete the custom logo for a theme.
Delete the custom logo for a theme.

    After deletion the theme falls back to the default Okta logo. This
    operation is reversible — you can re-upload a logo at any time.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.

    Returns:
        Dict with a ``message`` key on success, or an ``error`` key on failure.
delete_custom_domaintool Delete a custom domain by its ID.
Delete a custom domain by its ID.

    Permanently removes the custom domain from the organization. The default
    org domain (``id: "default"``) cannot be deleted. A confirmation prompt
    is shown before proceeding.

    Parameters:
        domain_id (str, required): Unique ID of the domain to delete.

    Returns:
        Dict with ``success: True`` and a confirmation message on success,
        ``success: False`` if cancelled, or an ``error`` key on failure.
delete_customized_error_pagetool Delete the customized error page for a brand.
Delete the customized error page for a brand.

    Removes the customized error page so the Okta default error page is shown
    in the live environment. Requires explicit confirmation before proceeding.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
delete_customized_sign_in_pagetool Delete the customized sign-in page for a brand.
Delete the customized sign-in page for a brand.

    Removes the customized sign-in page so the Okta default sign-in page is
    shown in the live environment. Requires explicit confirmation before
    proceeding.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
delete_deactivated_usertool Delete a user from the Okta organization who has already been deactivated or deprovisioned.
Delete a user from the Okta organization who has already been deactivated or deprovisioned.

    This tool permanently deletes a deactivated/deprovisioned user. The user will be
    asked for confirmation before the deletion proceeds.

    Parameters:
        user_id (str, required): The ID of the deactivated or deprovisioned user to delete.

    Returns:
        List containing the result of the deletion operation.
delete_device_assurance_policytool Delete a Device Assurance Policy from the Okta organization.
Delete a Device Assurance Policy from the Okta organization.

    The user will be asked for confirmation before the deletion proceeds.
    Note: A policy that is currently assigned to an authentication policy
    cannot be deleted.

    Parameters:
        device_assurance_id (str, required): The ID of the device assurance policy to delete.

    Returns:
        Dict with success status or cancellation message.

    Scope/permission errors:
        If the Okta API returns HTTP 401/403 (commonly due to missing OAuth scopes),
        this tool returns ``{"error": "..."}``.
        In that case, present the error message verbatim and STOP — do not retry
        and do not attempt follow-up actions until scopes are fixed.
delete_email_customizationtool Delete a specific email customization.
Delete a specific email customization.

    Permanently removes the specified language customization from the email
    template.  Requires explicit confirmation before proceeding.  If this
    is the only customization (i.e. the default), you may need to delete all
    customizations instead; deleting the sole default customization may
    return an error — use ``delete_all_email_customizations`` in that case.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        customization_id (str, required): The unique identifier of the
            customization to delete.
        language (str, optional): The language of the customization (e.g.
            ``"en"``).  Used only in the confirmation prompt — does not
            affect which record is deleted.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
delete_email_domaintool Delete an email domain by its ID.
Delete an email domain by its ID.

    Permanently removes the email domain from the organization.  Any brands
    currently associated with this domain will revert to sending email from
    the default Okta sender address.  A confirmation prompt is shown before
    proceeding.

    Parameters:
        email_domain_id (str, required): Unique ID of the email domain to
            delete.

    Returns:
        Dict with ``success: True`` and a confirmation message on success,
        ``success: False`` if cancelled by the user, or an ``error`` key on
        failure.
delete_grouptool Delete a group by ID from the Okta organization.
Delete a group by ID from the Okta organization.

    This tool deletes a group by its ID from the Okta organization.
    The user will be asked for confirmation before the deletion proceeds.

    Parameters:
        group_id (str, required): The ID of the group to delete.

    Returns:
        List containing the result of the deletion operation.
delete_policytool Delete a policy.
Delete a policy.

    The user will be asked for confirmation before the deletion proceeds.

    Parameters:
        policy_id (str, required): The ID of the policy to delete.

    Returns:
        Dict with success status.
delete_policy_ruletool Delete a policy rule.
Delete a policy rule.

    The user will be asked for confirmation before the deletion proceeds.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_id (str, required): The ID of the rule to delete.

    Returns:
        Dict with success status.
delete_preview_error_pagetool Delete the preview error page for a brand.
Delete the preview error page for a brand.

    Removes the preview error page. The preview environment will fall back to
    the default error page. Requires explicit confirmation before proceeding.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
delete_preview_sign_in_pagetool Delete the preview sign-in page for a brand.
Delete the preview sign-in page for a brand.

    Removes the preview sign-in page. The preview environment will fall back
    to the default sign-in page. Requires explicit confirmation before
    proceeding.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
get_applicationtool Get an application by ID from the Okta organization.
Get an application by ID from the Okta organization.

    Parameters:
        app_id (str, required): The ID of the application to retrieve
        expand (str, optional): Expands the app user object to include the user's profile or expand the
        app group object

    Returns:
        Dictionary containing the application details or error information.
get_brandtool Retrieve a specific brand by its ID.
Retrieve a specific brand by its ID.

    Parameters:
        brand_id (str, required): The unique identifier of the brand (e.g. ``bnd114iNkrcN6aR680g4``).
        expand (List[str], optional): Additional metadata to embed in the response.
            Valid values: "themes", "domains", "emailDomain".

    Returns:
        Dict containing the brand object, or an ``error`` key on failure.
get_brand_themetool Retrieve a specific theme by brand ID and theme ID.
Retrieve a specific theme by brand ID and theme ID.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme
            (e.g. ``thdul904tTZ6kWVhP0g3``).

    Returns:
        Dict containing the theme object, or an ``error`` key on failure.
        Theme fields include: ``id``, ``logo``, ``favicon``, ``backgroundImage``,
        ``primaryColorHex``, ``primaryColorContrastHex``, ``secondaryColorHex``,
        ``secondaryColorContrastHex``, and all five touchpoint variant values.
get_catalog_apptool Get a single OIN catalog app definition (including its provisioning schema).
Get a single OIN catalog app definition (including its provisioning schema).

    Parameters:
        app_name (str, required): The catalog app key (from list_catalog_apps)

    Returns:
        Dict with the catalog app definition, or error information.
get_custom_domaintool Retrieve a custom domain by its ID.
Retrieve a custom domain by its ID.

    Parameters:
        domain_id (str, required): Unique ID of the domain
            (e.g. ``"OcDz6iRyjkaCTXkdo0g3"``). Use ``"default"`` to retrieve
            the org's default Okta subdomain.

    Returns:
        Dict containing the domain object, or an ``error`` key on failure.
get_customized_error_pagetool Retrieve the customized error page for a brand.
Retrieve the customized error page for a brand.

    The customized error page is what end-users see in the live environment
    when an error occurs. Returns 404 if no customization exists (the default
    page is in use).

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent`` (HTML string) and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
get_customized_sign_in_pagetool Retrieve the customized sign-in page for a brand.
Retrieve the customized sign-in page for a brand.

    The customized sign-in page is what end-users see in the live environment.
    Returns 404 if no customization exists (the default page is in use).

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent``, ``widgetVersion``,
        ``widgetCustomizations``, and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
get_default_error_pagetool Retrieve the default (Okta-provided) error page for a brand.
Retrieve the default (Okta-provided) error page for a brand.

    The default error page is shown when no customized error page exists. It
    cannot be modified; use ``replace_customized_error_page`` to override it.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent`` (HTML string) and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
get_default_sign_in_pagetool Retrieve the default (Okta-provided) sign-in page for a brand.
Retrieve the default (Okta-provided) sign-in page for a brand.

    The default sign-in page is shown when no customized page exists. It
    cannot be modified; use ``replace_customized_sign_in_page`` to override
    it.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent``, ``widgetVersion``,
        ``widgetCustomizations``, and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
get_device_assurance_policytool Retrieve a specific Device Assurance Policy by ID.
Retrieve a specific Device Assurance Policy by ID.

    Use this to inspect the full configuration of a policy — platform type
    (ANDROID, IOS, MACOS, WINDOWS, CHROMEOS), minimum OS version, disk
    encryption requirements, biometric lock settings, jailbreak/root
    detection, and any other compliance checks configured in the policy.

    IMPORTANT — name-to-ID resolution: This tool requires a policy ID, not a
    name. If the user refers to a policy by name, you MUST call
    list_device_assurance_policies() first to get a FRESH, current list before
    resolving the name to an ID. NEVER resolve a policy name using results
    already present in the conversation — those results may be stale. Even if
    you called list_device_assurance_policies moments ago, call it again: a
    policy may have been created in the Okta UI between that call and now.
    Only after receiving the fresh list may you map the name to an ID and call
    this tool.

    Parameters:
        device_assurance_id (str, required): The ID of the device assurance policy.

    Returns:
        Dict containing the full policy details, or an error dict.

    Scope/permission errors:
        If the Okta API returns HTTP 401/403 (commonly due to missing OAuth scopes),
        this tool returns ``{"error": "..."}``.
        In that case, present the error message verbatim and STOP — do not retry
        and do not attempt follow-up actions until scopes are fixed.
get_email_customizationtool Retrieve a specific email customization by its ID.
Retrieve a specific email customization by its ID.

    Returns the full customization object including the HTML body, subject,
    language, ``isDefault`` status, and timestamps.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        customization_id (str, required): The unique identifier of the
            customization.

    Returns:
        Dict containing ``id``, ``language``, ``subject``, ``body``,
        ``isDefault``, ``created``, ``lastUpdated``, and ``_links``,
        or an ``error`` key on failure.
get_email_customization_previewtool Preview a rendered email customization.
Preview a rendered email customization.

    Returns the customization with all Okta template variables replaced by
    representative sample values.  Useful for verifying how the email will
    appear to recipients before publishing.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        customization_id (str, required): The unique identifier of the
            customization to preview.

    Returns:
        Dict containing ``subject`` and ``body`` with all template variables
        rendered, plus ``_links``, or an ``error`` key on failure.
get_email_default_contenttool Retrieve the Okta default content for an email template.
Retrieve the Okta default content for an email template.

    Returns the unmodified Okta-provided subject and body for the specified
    template.  This is the fallback content shown when no customization
    exists for a given language.  Useful for inspecting the baseline before
    creating a customization.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        language (str, optional): IETF BCP 47 language tag to retrieve the
            default content for.  Defaults to the current API user's language
            if omitted.

    Returns:
        Dict containing ``subject``, ``body``, and ``_links``, or an
        ``error`` key on failure.
get_email_default_content_previewtool Preview the rendered Okta default content for an email template.
Preview the rendered Okta default content for an email template.

    Returns the Okta default subject and body with all template variables
    replaced by representative sample values.  Unlike
    ``get_email_default_content``, all ``${variable}`` placeholders are
    substituted with real-looking data so you can see exactly what an end
    user would receive.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        language (str, optional): IETF BCP 47 language tag for the preview.
            Defaults to the current API user's language if omitted.

    Returns:
        Dict containing ``subject`` and ``body`` (fully rendered), plus
        ``_links``, or an ``error`` key on failure.
get_email_domaintool Retrieve an email domain by its ID.
Retrieve an email domain by its ID.

    Parameters:
        email_domain_id (str, required): Unique ID of the email domain
            (e.g. ``"OeD114iNkrcN6aR680g4"``).
        expand_brands (bool, optional): When ``True``, embeds associated Brand
            objects in ``_embedded.brands``.  Default: ``False``.

    Returns:
        Dict containing the email domain object, or an ``error`` key on
        failure.  Fields include ``id``, ``domain``, ``displayName``,
        ``userName``, ``validationStatus``, ``validationSubdomain``,
        ``dnsValidationRecords``, and (when expanded) ``_embedded.brands``.
get_email_settingstool Retrieve the email settings for a template.
Retrieve the email settings for a template.

    Returns the recipient configuration for the specified email template,
    controlling which user populations will receive emails of this type.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.

    Returns:
        Dict containing ``recipients`` (one of ``"ALL_USERS"``,
        ``"ADMINS_ONLY"``, ``"NO_USERS"``) and ``_links``, or an ``error``
        key on failure.
get_email_templatetool Retrieve a single email template for a brand.
Retrieve a single email template for a brand.

    Returns the named Okta email template with its navigation links.  Pass
    ``expand`` to embed settings or customization count inline.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``, ``"ForgotPassword"``,
            ``"PasswordResetByAdmin"``.
        expand (List[str], optional): Additional metadata to embed.  Valid
            values: ``"settings"`` and ``"customizationCount"``.

    Returns:
        Dict containing ``name``, ``_links``, and optionally ``_embedded``
        with the expanded data, or an ``error`` key on failure.
get_error_page_resourcestool Retrieve the error page sub-resource links for a brand.
Retrieve the error page sub-resource links for a brand.

    Returns navigation links (``_links``) for the customized, default, and
    preview error pages. Pass one or more values in ``expand`` to embed the
    full page content of those sub-resources inline in the response.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        expand (List[str], optional): Sub-resources to embed. Valid values:
            ``default``, ``customized``, ``customizedUrl``, ``preview``,
            ``previewUrl``.

    Returns:
        Dict containing ``_links`` (and optionally ``_embedded``) describing
        the available error page resources, or an ``error`` key on failure.
get_grouptool Get a group by ID from the Okta organization
Get a group by ID from the Okta organization

    This tool retrieves a group by its ID from the Okta organization.

    Parameters:
        group_id (str, required): The ID of the group to retrieve.

    Returns:
        List containing the group details.
get_login_failurestool Investigate why a user failed to log in. Returns BOTH authentication failures AND policy-blocked sign-ins in one call.Network
Investigate why a user failed to log in. Returns BOTH authentication failures AND policy-blocked sign-ins in one call.

    USE THIS TOOL (not get_logs) whenever the user asks about:
    - failed logins, login failures, sign-in problems
    - why a user can't log in / couldn't sign in
    - authentication errors, access denied
    - blocked logins, denied access
    - login issues, sign-in issues

    This tool automatically queries BOTH outcome types:
    - FAILURE: wrong password, invalid MFA, locked account, expired credentials
    - DENY: access blocked by sign-on policy (IP restriction, device trust, geo-fencing)

    A single get_logs call only returns ONE of these. This tool returns BOTH.

    Parameters:
        since (str, optional): Start of time window (ISO 8601). Defaults to 24 hours ago.
        until (str, optional): End of time window (ISO 8601). Defaults to now.
        user_id (str, optional): Okta user ID to scope the search. If provided, only
            events for this user are returned. Use list_users to find the user ID first.
        q (str, optional): Free-text search across log fields (e.g. a user's email).

    Returns:
        Dict containing:
        - failures: Events with outcome.result = FAILURE (wrong password, MFA errors, etc.)
            - login_events: Authentication/login-specific failure events
            - other_events: Other FAILURE events (token errors, DNS checks, etc.)
            - total: Total FAILURE event count
            - pagination: Pagination metadata
        - denials: Events with outcome.result = DENY (policy-blocked sign-ins)
            - login_events: Sign-on policy denial events
            - other_events: Other DENY events
            - total: Total DENY event count
            - pagination: Pagination metadata
        - summary: Human-readable summary with counts
        - time_window: The since/until range used
get_logstool Retrieve system logs from the Okta organization with pagination support.
Retrieve system logs from the Okta organization with pagination support.

    This tool retrieves system logs from the Okta organization.

    IMPORTANT — context isolation:
        Each call is INDEPENDENT. Do NOT carry forward q, search, or filter values from
        a previous query unless the user explicitly asks to apply the same filter again.
        Example: if the user previously asked about user X and now asks "show me ALL failed
        logins", do NOT add q=<user_X_email> to the new call — that would silently scope
        results to user X only.

    IMPORTANT — fetch_all usage:
        By default (fetch_all=False) only the first page is returned (up to 100 entries).
        RULE: For ANY query about "all", "complete", "total", "how many", "list all",
        "show all", "every", or any query that does not explicitly ask for just the
        latest/most recent event, you MUST use fetch_all=True. Without it the result
        is INCOMPLETE and counts will be WRONG.
        ALWAYS pair fetch_all=True with a time window: since="...", until="..."
        Example: get_logs(fetch_all=True, filter='outcome.result eq "FAILURE"', since="2026-03-11T00:00:00.000Z", until="2026-03-12T00:00:00.000Z")
        If the user does not specify a time range, default to the last 24 hours.
        fetch_all is capped at 50 pages (5,000 entries). If stopped_early=True, tell the user
        to narrow their time window or add a more specific filter.

    CRITICAL — login failure investigation:
        FAILURE and DENY are TWO SEPARATE outcome values. A single call is NEVER sufficient.
        - FAILURE: authentication failures (wrong password, locked account, MFA not completed)
        - DENY: access blocked by a sign-on policy rule (IP/device/policy violation)
        You MUST ALWAYS make TWO separate calls when investigating login failures:
          1. get_logs(filter='outcome.result eq "FAILURE"', fetch_all=True, ...)
          2. get_logs(filter='outcome.result eq "DENY"', fetch_all=True, ...)
        Making only ONE call is a BUG — you will silently miss an entire category of failures.
        This applies to ALL prompts about: failed logins, sign-in issues, login problems,
        why a user can't log in, authentication errors, access denied, denied sign-ins,
        denied access, blocked logins, sign-in failures, access issues, etc.

    CRITICAL — MFA challenge queries:
        When the user asks about MFA challenges, MFA prompts, step-up auth, or authentication
        challenges, ALWAYS use filter='outcome.result eq "CHALLENGE"'.
        Do NOT use eventType filters or outcome.result eq "SUCCESS" for MFA challenges.
        Using SUCCESS or eventType is WRONG for challenges — it will return incorrect results.

    CRITICAL — invalid outcome value:
        If the user asks for an unrecognised outcome type (e.g. "INVALID_OUTCOME", "BLOCKED"):
        You MUST still call this tool with filter='outcome.result eq "<VALUE>"' and let the
        server return the error. Do NOT decide yourself that the value is invalid and skip
        the call or say "no events found". The server will return an error dict — you MUST
        read that error dict and relay the message to the user, explaining which values are
        valid. Never silently say "no events found" when the tool returns an error dict.

    Parameters:
        fetch_all (bool, optional): If True, automatically fetch all pages of results. Default: False.
            USE fetch_all=True whenever the user asks for all/complete/total results.
        after (str, optional): Pagination cursor for fetching results after this point.
        limit (int, optional): Maximum number of log entries to return per page (min 20, max 100).
        since (str, optional): Filter logs since this timestamp (ISO 8601 format).
        until (str, optional): Filter logs until this timestamp (ISO 8601 format).
        filter (str, optional): Filter expression for log events.
            Use outcome.result to filter by event outcome. The ONLY valid values are:
            - "SUCCESS"   – successful operations (e.g. logins, password changes)
            - "FAILURE"   – failed operations (e.g. wrong password, locked account)
            - "DENY"      – access blocked by a sign-on policy rule (policy-blocked logins)
            - "ALLOW"     – access explicitly allowed by a sign-on policy rule
            - "CHALLENGE" – MFA or step-up challenge triggered.
                            ALWAYS use filter='outcome.result eq "CHALLENGE"' for MFA challenges.
                            Do NOT use eventType filters or user.authentication fields for this.
                            Using outcome.result eq "SUCCESS" or eventType is WRONG for challenges.
            - "UNKNOWN"   – outcome could not be determined
            Any other value (e.g. "INVALID_OUTCOME", "BLOCKED", "DENIED") is NOT valid and
            will return an error. If the user asks for an unrecognised outcome type, you MUST
            still call this tool with filter='outcome.result eq "<VALUE>"' and let the server
            return the error. Do NOT decide yourself that the value is invalid and skip the call.
        q (str, optional): Query string to search log events.

    Examples:
        For pagination:
        - First call: get_logs()
        - Next page: get_logs(after="cursor_value")
        - All pages: get_logs(fetch_all=True)
        - Time range: get_logs(since="2024-01-01T00:00:00.000Z", until="2024-01-02T00:00:00.000Z")
        - Policy-blocked logins: get_logs(filter='outcome.result eq "DENY"', fetch_all=True)
        - Authentication failures: get_logs(filter='outcome.result eq "FAILURE"', fetch_all=True)
        - MFA challenges: get_logs(filter='outcome.result eq "CHALLENGE"', fetch_all=True)
        - Complete login failure investigation (ALWAYS do both):
            get_logs(filter='outcome.result eq "FAILURE"', since=..., until=..., fetch_all=True)
            get_logs(filter='outcome.result eq "DENY"', since=..., until=..., fetch_all=True)

    Returns:
        Dict containing:
        - items: List of log entry objects
        - total_fetched: Number of log entries returned
        - has_more: Boolean indicating if more results are available
        - next_cursor: Cursor for the next page (if has_more is True)
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
            NOTE: fetch_all is capped at 50 pages (5,000 entries). If stopped_early=True,
            advise the user to narrow their time window or use a more specific filter.
        - error: If present, relay this error message directly to the user. Do NOT treat
            an error response as "no results found" — always read and report the error text.
get_policytool Retrieve a specific policy by ID.
Retrieve a specific policy by ID.

    Parameters:
        policy_id (str, required): The ID of the policy to retrieve.

    Returns:
        Dict containing the policy details.
get_policy_ruletool Retrieve a specific policy rule.
Retrieve a specific policy rule.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_id (str, required): The ID of the rule.

    Returns:
        Dict containing the policy rule details.
get_preview_error_pagetool Retrieve the preview error page for a brand.
Retrieve the preview error page for a brand.

    The preview page is a sandbox for testing error page changes before they
    go live. Returns 404 if no preview exists.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent`` (HTML string) and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
get_preview_sign_in_pagetool Retrieve the preview sign-in page for a brand.
Retrieve the preview sign-in page for a brand.

    The preview page is a sandbox for testing sign-in page changes before
    they go live. Returns 404 if no preview exists.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent``, ``widgetVersion``,
        ``widgetCustomizations``, and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
get_scope_statustool Report which Okta MCP tools are active and which are disabled due to missing OAuth scopes.
Report which Okta MCP tools are active and which are disabled due to missing OAuth scopes.

    Call this tool whenever:
    - A user asks you to perform an Okta operation but no matching tool is available.
    - You are unsure whether a capability is supported.
    - You want to explain why a specific action cannot be performed.

    Returns a dict with:
    - ``configured_scopes``: list of OAuth scopes present in the token at startup.
    - ``disabled_tools``: dict mapping each disabled tool name to the scope it requires.
    - ``instructions``: actionable steps the user must take to enable the missing tools.

    IMPORTANT: If the user asks you to perform an action and the required tool appears
    in ``disabled_tools``, do NOT attempt the operation. Instead, tell the user:
    "This tool is not available because the scope '<scope>' is missing from your token.
    Follow the instructions below to enable it and restart the MCP server."
get_sign_in_page_resourcestool Retrieve the sign-in page sub-resource links for a brand.
Retrieve the sign-in page sub-resource links for a brand.

    Returns navigation links (``_links``) for the customized, default, and
    preview sign-in pages. Pass one or more values in ``expand`` to embed the
    full page content of those sub-resources inline in the response.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        expand (List[str], optional): Sub-resources to embed. Valid values:
            ``default``, ``customized``, ``customizedUrl``, ``preview``,
            ``previewUrl``.

    Returns:
        Dict containing ``_links`` (and optionally ``_embedded``) describing
        the available sign-in page resources, or an ``error`` key on failure.
get_sign_out_page_settingstool Retrieve the sign-out page settings for a brand.
Retrieve the sign-out page settings for a brand.

    Returns the current sign-out page configuration, which controls where
    users are redirected after signing out.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing:
        - type (str): ``OKTA_DEFAULT`` (show the Okta default sign-out page)
          or ``EXTERNALLY_HOSTED`` (redirect to a custom URL).
        - url (str): The redirect URL, present only when type is
          ``EXTERNALLY_HOSTED``.
        - error (str): Present only when the operation fails.
get_usertool Get a user by ID from the Okta organization
Get a user by ID from the Okta organization

    This tool retrieves a user by their ID from the Okta organization.

    Parameters:
        user_id (str, required): The ID of the user to retrieve.

    Returns:
        List containing the user details.
get_user_profile_attributestool List all user profile attributes supported by your Okta org.
List all user profile attributes supported by your Okta org.
    This is helpful in case you need to check if the user profile attribute is valid.
    The prompt can contain non existent search terms, in which case we should seek clarification from the user
    by listing most similar profile attributes.

    Returns:
        A list of user profile attributes.
install_oin_apptool Install an instance of an OIN catalog app (e.g. a provisioning-capable SCIM app).
Install an instance of an OIN catalog app (e.g. a provisioning-capable SCIM app).

    Unlike create_application (which builds custom apps), this preserves the
    catalog ``name`` key. The typed SDK create path strips ``name`` from the
    request body, so a catalog/OIN app can't be installed through create_application;
    this issues the request directly. Provisioning capability is determined by the
    catalog app definition at install time — it cannot be added to a custom app
    afterwards. Discover ``name`` and the allowed ``signOnMode`` values via
    list_catalog_apps / get_catalog_app.

    Parameters:
        name (str, required): The OIN catalog app key (e.g. from list_catalog_apps)
        label (str, required): Display label for the installed instance
        sign_on_mode (str, required): A sign-on mode the catalog app supports
            (e.g. SAML_2_0, OPENID_CONNECT, SECURE_PASSWORD_STORE, BOOKMARK)
        settings (dict, optional): Additional app settings/profile some OIN apps require
        activate (bool, optional): Activate the app on creation. Defaults to True.

    Returns:
        Dict with the installed application, or error information.
list_applicationstool List all applications from the Okta organization.
List all applications from the Okta organization.

    Parameters:
        q (str, optional): Searches for applications by label, property, or link
        after (str, optional): Specifies the pagination cursor for the next page of results
        limit (int, optional): Specifies the number of results per page (min 20, max 100)
        filter (str, optional): Filters applications by status, user.id, group.id, or credentials.signing.kid
        expand (str, optional): Expands the app user object to include the user's profile or expand the app group
        object to include the group's profile
        include_non_deleted (bool, optional): Include non-deleted applications in the results
        fetch_all (bool, optional): If True, automatically fetch all pages of results. Default: False.

    Examples:
        For pagination:
        - First call: list_applications()
        - Next page: list_applications(after="cursor_value")
        - All pages: list_applications(fetch_all=True)

    Returns:
        Dict containing:
        - items: List of application objects
        - total_fetched: Number of applications returned
        - has_more: Boolean indicating if more results are available
        - next_cursor: Cursor for the next page (if has_more is True)
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
list_brand_domainstool List all custom domains associated with a brand.
List all custom domains associated with a brand.

    Each brand can have one or more domains.  The default Okta subdomain
    (e.g. ``yourorg.okta.com``) is always present; additional custom domains
    appear here once they have been verified and activated.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing:
        - domains (List[Dict]): List of domain objects associated with the brand.
          Each domain object includes: ``id``, ``domain``, ``certificateSourceType``,
          ``validationStatus``, ``brandId``, and ``_links``.
        - total_fetched (int): Number of domains returned.
        - error (str): Present only when the operation fails.
list_brand_themestool List all themes for a brand.
List all themes for a brand.

    Currently each Okta org supports only one theme per brand, so this always
    returns a single-element list.

    Parameters:
        brand_id (str, required): The unique identifier of the brand
            (e.g. ``bnd114iNkrcN6aR680g4``).

    Returns:
        Dict containing:
        - themes (List[Dict]): List of theme objects (always one element).
        - total_fetched (int): Number of themes returned.
        - error (str): Present only when the operation fails.
list_brandstool List all brands in the Okta organization with pagination support.
List all brands in the Okta organization with pagination support.

    Parameters:
        expand (List[str], optional): Additional metadata to embed in each brand object.
            Valid values: "themes", "domains", "emailDomain".
            Example: ["themes", "emailDomain"]
        after (str, optional): Opaque pagination cursor obtained from the ``next_cursor``
            field of a previous response. Used to fetch the next page.
        limit (int, optional): Maximum number of brands to return per page (1–200).
            Defaults to 20 when omitted.
        q (str, optional): Case-insensitive search string that filters brands by name.
        fetch_all (bool, optional): When True the tool automatically follows pagination
            links and returns all brands in a single response. Default: False.

    Examples:
        - First page, no extras:   list_brands()
        - Include theme data:      list_brands(expand=["themes"])
        - Search by name:          list_brands(q="Default")
        - Next page manually:      list_brands(after="<cursor>")
        - All brands at once:      list_brands(fetch_all=True)

    Returns:
        Dict containing:
        - items (List[Dict]): List of brand objects.
        - total_fetched (int): Number of brands in this response.
        - has_more (bool): True if additional pages are available.
        - next_cursor (str | None): Cursor value for the next page.
        - fetch_all_used (bool): True when fetch_all was used.
        - pagination_info (Dict): Detailed stats when fetch_all=True.
list_catalog_appstool Browse the Okta Integration Network (OIN) app catalog.
Browse the Okta Integration Network (OIN) app catalog.

    Use this to discover an app's ``name`` (the catalog key) to pass to
    install_oin_app. Apps that support outbound provisioning list a provisioning
    capability in their ``features`` (e.g. a SCIM 2.0 test app). A plain custom
    SAML/OIDC app created with create_application cannot do provisioning; you need
    an installed instance of a provisioning-capable catalog app.

    Parameters:
        q (str, optional): Filters the catalog by app name/keyword (e.g. "scim")
        after (str, optional): Pagination cursor — the ``name`` of the last
            entry of the previous page (returned as ``next_cursor``)
        limit (int, optional): Number of catalog entries per page (server
            default: 20)
        fetch_all (bool, optional): If True, automatically fetch all pages of
            results. The unfiltered catalog holds thousands of entries and can
            take hundreds of sequential requests — strongly prefer combining
            this with ``q``. Default: False.

    Examples:
        For pagination:
        - First call: list_catalog_apps(q="scim")
        - Next page: list_catalog_apps(q="scim", after="cursor_value")
        - All pages: list_catalog_apps(q="scim", fetch_all=True)

    Returns:
        Dict containing:
        - items: List of catalog entries (each has ``name``, ``displayName``,
          ``features``, ``signOnModes``)
        - total_fetched: Number of entries returned
        - has_more: Boolean indicating if more results are available. May be
          conservatively True when the final page is exactly full — an empty
          next page then confirms the end.
        - next_cursor: Cursor for the next page (if has_more is True). Also
          set when fetch_all stopped early, as the resume point.
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
list_custom_domainstool List all custom domains in the Okta organization.
List all custom domains in the Okta organization.

    Returns all custom domains including the default Okta subdomain (id:
    ``"default"``). The API does not support pagination — all domains are
    returned in a single response.

    Each domain object includes:
    - ``id``                   – Unique domain ID (``"default"`` for the org base domain).
    - ``domain``               – The fully qualified domain name.
    - ``brandId``              – ID of the brand associated with this domain.
    - ``certificateSourceType``– ``"MANUAL"`` or ``"OKTA_MANAGED"``.
    - ``validationStatus``     – ``NOT_STARTED`` | ``IN_PROGRESS`` | ``VERIFIED`` |
                                 ``COMPLETED`` | ``FAILED_TO_VERIFY``.
    - ``dnsRecords``           – DNS records to configure at your DNS provider
                                 (TXT + CNAME, present until domain is verified).
    - ``publicCertificate``    – Certificate metadata (present after verification).

    Returns:
        Dict containing:
        - domains (List[Dict]): List of domain objects.
        - total_fetched (int): Number of domains returned.
        - error (str): Present only when the operation fails.
list_device_assurance_policiestool List all Device Assurance Policies in the Okta organization.
List all Device Assurance Policies in the Okta organization.

    Use this to audit which device assurance policies exist, compare OS
    version requirements across policies, find policies that do or do not
    block jailbroken/rooted devices, or identify policies whose platform
    requirements may be outdated.

    *** MANDATORY — OS VERSION THRESHOLD QUERIES ***
        Any time the user's request mentions a version number for filtering or
        comparison (e.g. "older than 14.2", "below 14.2.1", "at least 13.x"):

        1. You MUST pass that exact user-supplied string as ``version_threshold``.
           WRONG: list_device_assurance_policies()                         ← bypasses validation
           RIGHT: list_device_assurance_policies(version_threshold="<user value>") ← always pass through
           NEVER call this tool with no arguments and then filter the result
           yourself — that completely bypasses format validation.

        2. If the version is rejected (e.g. because the patch component is
           missing), relay the error word-for-word. STOP and ask the user:
           "What is the exact full version in X.Y.Z format?" Do NOT guess
           or complete the version yourself. Do NOT proceed until the user
           explicitly confirms the full X.Y.Z version.

        3. NEVER guess or infer what the user "probably" meant — always ask.

    IMPORTANT — always call fresh: Never reuse results from a previous call
    to resolve a policy name to an ID. Always call this tool again to get
    an up-to-date list, as policies may have been created or deleted since
    the last call. The response includes a ``retrieved_at`` timestamp — if
    the user references a policy by name that does not appear in a previous
    list, you MUST call this tool again before concluding that the policy
    does not exist.

    IMPORTANT — intermittent empty response: If this tool returns an empty
    list but the user expects policies to exist, call it again — the API
    occasionally returns an empty response on the first call after server
    start. A retry will return the correct data.

    Returns:
        Dict containing:
            - policies (List[Dict]): List of device assurance policy objects.
              Each policy includes a ``status`` field (``ACTIVE``, ``INACTIVE``,
              or ``UNKNOWN`` if the API did not return it). You MUST present this
              field when listing or comparing policies so the user sees the current
              activation state.
            - version_threshold (str, optional): Echo of the validated threshold
              when one was supplied. Use this value for any subsequent filtering
              or comparison in your response.
            - retrieved_at (str): ISO-8601 UTC timestamp of when this list
              was fetched. Use this to detect stale data.
            - note (str): Reminder that the list may become stale and must
              be re-fetched before resolving a policy name to an ID.
            - warning (str): Present if the API returned an unexpected empty
              response; the caller should retry.
            - error (str): Error message if the operation fails.

    Scope/permission errors:
        If the Okta API returns HTTP 401/403 (commonly due to missing OAuth scopes),
        this tool returns ``{"error": "..."}``.
        In that case, present the error message verbatim and STOP — do not retry
        and do not attempt follow-up actions until scopes are fixed.
list_email_customizationstool List all customizations for an email template with pagination support.
List all customizations for an email template with pagination support.

    Returns every language variant that has been created for the specified
    email template.  Each entry includes the full customization body,
    subject, language, ``isDefault`` flag, and timestamps.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``, ``"ForgotPassword"``.
        after (str, optional): Pagination cursor for the next page.
        fetch_all (bool, optional): If True, automatically fetch all pages. Default: False.

    Returns:
        Dict containing:
        - items (List[Dict]): Customization dicts (may be empty if none exist).
        - total_fetched (int): Number of customizations returned.
        - has_more (bool): Whether more results are available.
        - next_cursor (str | None): Cursor for the next page.
        - fetch_all_used (bool): Whether fetch_all was used.
        - pagination_info (Dict): Detailed metadata (when fetch_all=True).
        - error (str): Present only when the operation fails.
list_email_domainstool List all email domains in the Okta organization.
List all email domains in the Okta organization.

    Returns every Email Domain configured in the org.  Each domain shows
    its current validation status and the DNS records that must be published
    to complete verification.

    Parameters:
        expand_brands (bool, optional): When ``True``, embeds associated Brand
            objects in ``_embedded.brands`` for each returned domain.
            Default: ``False``.

    Returns:
        Dict containing:
        - ``email_domains`` (List[Dict]): List of email domain objects.
        - ``total_fetched`` (int): Number of domains returned.
        - ``error`` (str): Present only when the operation fails.

    Each email domain object includes:
    - ``id``                   – Unique email domain ID.
    - ``domain``               – The custom domain (e.g. ``"example.com"``).
    - ``displayName``          – Sender display name (e.g. ``"Acme IT"``).
    - ``userName``             – Local part of sender address (e.g. ``"noreply"``).
    - ``validationSubdomain``  – Mail subdomain prefix (default ``"mail"``).
    - ``validationStatus``     – ``NOT_STARTED`` | ``POLLING`` | ``VERIFIED`` |
                                 ``ERROR`` | ``DELETED``.
    - ``dnsValidationRecords`` – DNS records to publish: ``recordType``,
                                 ``fqdn``, ``verificationValue``.
    - ``_embedded.brands``     – Associated Brand objects (when
                                 ``expand_brands=True``).
list_email_templatestool List all email templates for a brand with pagination support.
List all email templates for a brand with pagination support.

    Returns every Okta-managed email template available on the brand.  By
    default each entry contains only the template ``name`` and ``_links``.
    Use ``expand`` to embed additional metadata inline.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        expand (List[str], optional): Additional metadata to embed in each
            template object.  Valid values: ``"settings"`` (embed the
            recipients setting) and ``"customizationCount"`` (embed the
            number of active customizations).
        after (str, optional): Pagination cursor for the next page.
        fetch_all (bool, optional): If True, automatically fetch all pages. Default: False.

    Returns:
        Dict containing:
        - items (List[Dict]): Template dicts (``name``, ``_links``, optionally ``_embedded``).
        - total_fetched (int): Number of templates returned.
        - has_more (bool): Whether more results are available.
        - next_cursor (str | None): Cursor for the next page.
        - fetch_all_used (bool): Whether fetch_all was used.
        - pagination_info (Dict): Detailed metadata (when fetch_all=True).
        - error (str): Present only when the operation fails.
list_group_appstool List all applications assigned to a group with pagination support.
List all applications assigned to a group with pagination support.

    Parameters:
        group_id (str, required): The ID of the group to retrieve applications from.
        after (str, optional): Pagination cursor for the next page.
        limit (int, optional): Maximum number of apps to return per page (max 200). Default: 20.
        fetch_all (bool, optional): If True, automatically fetch all pages. Default: False.

    Returns:
        Dict containing:
            - items (List): List of application objects
            - total_fetched (int): Number of apps returned
            - has_more (bool): Whether more results are available
            - next_cursor (str | None): Cursor for the next page
            - fetch_all_used (bool): Whether fetch_all was used
            - pagination_info (Dict): Detailed pagination metadata (when fetch_all=True)
list_group_userstool List all users in a group by ID from the Okta organization with pagination support.
List all users in a group by ID from the Okta organization with pagination support.

    This tool retrieves all users in a group by its ID from the Okta organization.

    Parameters:
        group_id (str, required): The ID of the group to retrieve users from.
        fetch_all (bool, optional): If True, automatically fetch all pages of results. Default: False.
        after (str, optional): Pagination cursor for fetching results after this point.
        limit (int, optional): Maximum number of users to return per page (min 20, max 100).

    Examples:
        For pagination:
        - First call: list_group_users("group_id")
        - Next page: list_group_users("group_id", after="cursor_value")
        - All pages: list_group_users("group_id", fetch_all=True)

    Returns:
        Dict containing:
        - items: List of user objects in the group
        - total_fetched: Number of users returned
        - has_more: Boolean indicating if more results are available
        - next_cursor: Cursor for the next page (if has_more is True)
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
list_groupstool List all the groups from the Okta organization with pagination support.
List all the groups from the Okta organization with pagination support.
    If search, filter, or q is specified, it will list only those groups that satisfy the condition.

    Parameters:
        search (str, optional): The value of the search string when searching for some specific set of groups.
        filter (str, optional): A filter string to filter groups by Okta profile attributes.
        q (str, optional): A query string to search groups by Okta profile attributes.
        fetch_all (bool, optional): If True, automatically fetch all pages of results. Default: False.
        after (str, optional): Pagination cursor for fetching results after this point.
        limit (int, optional): Maximum number of groups to return per page (min 20, max 100).
        The search, filter, and q are performed on group profile attributes.

    Examples:
        For pagination:
        - First call: list_groups(search="profile.name sw \"Engineering\"")
        - Next page: list_groups(search="profile.name sw \"Engineering\"", after="cursor_value")
        - All pages: list_groups(search="profile.name sw \"Engineering\"", fetch_all=True)

    Returns:
        Dict containing:
        - items: List of group objects
        - total_fetched: Number of groups returned
        - has_more: Boolean indicating if more results are available
        - next_cursor: Cursor for the next page (if has_more is True)
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
list_policiestool List all the policies from the Okta organization with pagination support.
List all the policies from the Okta organization with pagination support.

    Parameters:
        type (str, required): Specifies the type of policy to return. Available policy types are:
            OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, IDP_DISCOVERY, ACCESS_POLICY,
            PROFILE_ENROLLMENT, POST_AUTH_SESSION, ENTITY_RISK
        status (str, optional): Refines the query by the status of the policy - ACTIVE or INACTIVE.
        q (str, optional): A query string to search policies by name.
        limit (int, optional): Number of results to return per page (min 20, max 100). Default: 20.
        after (str, optional): Pagination cursor for the next page of policies.
        fetch_all (bool, optional): If True, automatically fetch all pages. Default: False.

    Returns:
        Dict containing:
            - items (List[Dict]): List of policy dictionaries
            - total_fetched (int): Number of policies returned
            - has_more (bool): Whether more results are available
            - next_cursor (str | None): Cursor for the next page
            - fetch_all_used (bool): Whether fetch_all was used
            - pagination_info (Dict): Detailed pagination metadata (when fetch_all=True)
            - error (str): Error message if the operation fails
list_policy_rulestool List all rules for a specific policy with pagination support.
List all rules for a specific policy with pagination support.

    Parameters:
        policy_id (str, required): The ID of the policy.
        after (str, optional): Pagination cursor for the next page of rules.
        fetch_all (bool, optional): If True, automatically fetch all pages. Default: False.

    Returns:
        Dict containing:
            - items (List[Dict]): List of policy rule dictionaries
            - total_fetched (int): Number of rules returned
            - has_more (bool): Whether more results are available
            - next_cursor (str | None): Cursor for the next page
            - fetch_all_used (bool): Whether fetch_all was used
            - pagination_info (Dict): Detailed pagination metadata (when fetch_all=True)
            - error (str): Error message if the operation fails
list_sign_in_widget_versionstool List all available Okta Sign-In Widget versions for a brand.
List all available Okta Sign-In Widget versions for a brand.

    Returns the version strings that can be used in the ``widget_version``
    parameter of ``replace_customized_sign_in_page`` and
    ``replace_preview_sign_in_page``. Includes both specific versions and
    range expressions.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing:
        - versions (List[str]): Available widget version strings,
          e.g. ``["5.15", "^5", "6.0", "7", "*"]``.
        - total_fetched (int): Number of versions returned.
        - error (str): Present only when the operation fails.
list_user_groupstool List all groups that a user is a member of.
List all groups that a user is a member of.

    This tool retrieves all groups of which the specified user is a member.
    To list all groups in your org, use list_groups() from the Groups tools instead.

    Note: the underlying Okta API returns the user's full group membership in a
    single response and does not support pagination for this endpoint.

    Parameters:
        user_id (str, required): The ID, login, or login shortname of the user.

    Returns:
        List of group objects the user belongs to.
list_userstool List all the users from the Okta organization with pagination support.
List all the users from the Okta organization with pagination support.
    If search, filter, or q is specified, it will list only those users that satisfy the condition.
    Use after and limit for pagination.
    Use fetch_all=True to automatically fetch all pages of results.
    By default, it will only fetch users whose status is not "DEPROVISIONED".

    IMPORTANT — default page size:
        When limit is NOT provided, the server defaults to 20 users per page.
        ALWAYS omit the limit parameter unless the user explicitly requests a
        different page size.

    Parameters:
        search (str, optional): The value of the search string when searching for some specific set of users.
        filter (str, optional): A filter string to filter users by Okta profile attributes.
        q (str, optional): A query string to search users by Okta profile attributes.
        fetch_all (bool, optional): If True, automatically fetch all pages of results. Default: False.
            NOTE: fetch_all is capped at 10 pages (2,000 users) to keep responses manageable.
            If the org has more users than the cap, the result will be partial. Always check
            pagination_info.stopped_early in the response — if True, the count is incomplete
            and you MUST tell the user "at least N users were found; the result may be incomplete.
            Use export_users_csv() for a complete export."
            NEVER say the org has been "fully enumerated" or report the count as the exact total
            when stopped_early is True.
            WARNING: For orgs with more than 2,000 users, use export_users_csv() instead —
            it writes directly to disk and handles any org size without response size limits.
        after (str, optional): Pagination cursor for fetching results after this point.
        limit (int, optional): Maximum number of users to return per page (min 20, max 200).
            Default: 20.
        The search, filter, and q are performed on user profile attributes.

    Examples:
        To search users whose organization is Okta use search=profile.organization eq "Okta"
        To search users updated after 06/01/2013 but with a status of LOCKED_OUT or RECOVERY use
        search=lastUpdated gt "2013-06-01T00:00:00.000Z" and (status eq "LOCKED_OUT" or status eq "RECOVERY")

        For pagination:
        - First call: list_users(search="profile.department eq \"Engineering\"")
        - Next page: list_users(search="profile.department eq \"Engineering\"", after="cursor_value")
        - All pages: list_users(search="profile.department eq \"Engineering\"", fetch_all=True)

    Returns:
        Dict containing:
        - items: List of (user.profile, user.id) tuples
        - total_fetched: Number of users returned
        - has_more: Boolean indicating if more results are available
        - next_cursor: Cursor for the next page (if has_more is True)
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
remove_user_from_grouptool Remove a user from a group by ID in the Okta organization.
Remove a user from a group by ID in the Okta organization.

    This tool removes a user from a group by its ID in the Okta organization.

    Parameters:
        group_id (str, required): The ID of the group to remove the user from.
        user_id (str, required): The ID of the user to remove from the group.

    Returns:
        List containing the result of the removal operation.
replace_brandtool Replace (fully update) a brand by its ID.
Replace (fully update) a brand by its ID.

    This is a full replacement (HTTP PUT). Every writable field in the brand
    will be overwritten — omitted optional fields revert to their defaults.

    Parameters:
        brand_id (str, required): The unique identifier of the brand to update.
        name (str, required): New display name for the brand.
            The reserved name ``DRAPP_DOMAIN_BRAND`` is not allowed.
        agree_to_custom_privacy_policy (bool, optional): Must be ``True`` when
            providing a ``custom_privacy_policy_url``. Not required when clearing
            the URL.
        custom_privacy_policy_url (str, optional): HTTPS URL of your custom
            privacy policy page.  Requires ``agree_to_custom_privacy_policy=True``.
            Pass ``null`` / omit to reset to the Okta default.
        remove_powered_by_okta (bool, optional): When ``True``, removes the
            "Powered by Okta" footer from the sign-in page and the End-User
            Dashboard.  Defaults to ``False``.
        locale (str, optional): IETF BCP 47 language tag for the brand's locale
            (e.g. ``"en"``, ``"fr"``, ``"de"``).
        email_domain_id (str, optional): ID of an email domain to associate with
            this brand (controls the ``From`` address for brand emails).
        default_app (dict, optional): The application shown by default when a
            user navigates to the brand's Okta-hosted domain.  Accepted keys:
            - ``appInstanceId`` (str | None): ID of the app instance.
            - ``appLinkName`` (str | None): App link name.
            - ``classicApplicationUri`` (str | None): URI for classic (Okta1) apps.

    Returns:
        Dict containing the updated brand object, or an ``error`` key on failure.
replace_brand_themetool Replace (fully update) a theme's colours and touchpoint variants.
Replace (fully update) a theme's colours and touchpoint variants.

    All five touchpoint variant fields are required. Optional fields default to
    ``null`` if omitted, which lets Okta auto-optimise contrast colours.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.
        primary_color_hex (str, required): Primary colour hex code (e.g. ``"#1662dd"``).
        secondary_color_hex (str, required): Secondary colour hex code (e.g. ``"#ebebed"``).
        sign_in_page_touch_point_variant (str, required):
            Variant for the sign-in page.
            Valid values: ``BACKGROUND_IMAGE`` | ``BACKGROUND_SECONDARY_COLOR`` | ``OKTA_DEFAULT``.
        end_user_dashboard_touch_point_variant (str, required):
            Variant for the End-User Dashboard.
            Valid values: ``FULL_THEME`` | ``LOGO_ON_FULL_WHITE_BACKGROUND`` | ``OKTA_DEFAULT`` | ``WHITE_LOGO_BACKGROUND``.
        error_page_touch_point_variant (str, required):
            Variant for the error page.
            Valid values: ``BACKGROUND_IMAGE`` | ``BACKGROUND_SECONDARY_COLOR`` | ``OKTA_DEFAULT``.
        email_template_touch_point_variant (str, required):
            Variant for email templates.
            Valid values: ``FULL_THEME`` | ``OKTA_DEFAULT``.
        primary_color_contrast_hex (str, optional): Primary contrast colour hex code.
            When omitted, Okta auto-optimises for accessibility.
        secondary_color_contrast_hex (str, optional): Secondary contrast colour hex code.
        loading_page_touch_point_variant (str, optional):
            Variant for the Okta loading page.
            Valid values: ``NONE`` | ``OKTA_DEFAULT``. Defaults to ``OKTA_DEFAULT``.

    Returns:
        Dict containing the updated theme object, or an ``error`` key on failure.
replace_custom_domaintool Replace the brand associated with a custom domain.
Replace the brand associated with a custom domain.

    Associates a different brand with the given custom domain. The brand
    controls the look-and-feel of the sign-in page and email templates served
    under that domain.

    Constraints:
    - The default brand (``isDefault: true``) cannot be mapped to a custom
      domain (API returns 409).
    - The PUT is allowed regardless of the domain's ``validationStatus``;
      the brand association can be changed at any point in the domain lifecycle.

    Parameters:
        domain_id (str, required): Unique ID of the domain to update.
        brand_id (str, required): ID of the brand to associate.

    Returns:
        Dict containing the updated domain object, or an ``error`` key on failure.
replace_customized_error_pagetool Replace (or create) the customized error page for a brand.
Replace (or create) the customized error page for a brand.

    Sets the HTML that appears in the live environment when an error occurs.
    Replaces the entire customized page; any fields omitted revert to their
    defaults.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        page_content (str, optional): Full HTML content of the error page.
            Supports Okta template variables such as ``{{errorSummary}}``,
            ``{{errorDescription}}``, ``{{buttonText}}``, and
            ``{{{ErrorPageResources}}}``.
        csp_mode (str, optional): Content Security Policy enforcement mode.
            Valid values: ``enforced``, ``report_only``, ``disabled``.
        csp_report_uri (str, optional): URI where CSP violation reports are
            sent.
        csp_src_list (List[str], optional): Allowed source origins for the
            Content Security Policy.

    Returns:
        Dict containing the updated error page object, or an ``error`` key on
        failure.
replace_customized_sign_in_pagetool Replace (or create) the customized sign-in page for a brand.
Replace (or create) the customized sign-in page for a brand.

    Sets the HTML, widget version, and widget behaviour that appear in the
    live environment. The ``widgetCustomizations`` parameter lets you control
    labels, links, and toggles shown in the Okta sign-in widget.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        page_content (str, optional): Full HTML content of the sign-in page.
        widget_version (str, optional): Okta Sign-In Widget version.
            Accepts wildcards and ranges, e.g. ``"*"``, ``"^5"``, ``"7"``,
            ``"5.15"``. Use ``list_sign_in_widget_versions`` to see available
            values.
        widget_customizations (Dict[str, Any], optional): Dict of widget
            customisation fields using snake_case keys, for example::

                {
                    "sign_in_label": "Log in",
                    "forgot_password_label": "Reset password",
                    "forgot_password_url": "https://example.com/reset",
                    "show_password_visibility_toggle": True,
                    "show_user_identifier": True,
                    "custom_link1_label": "Help",
                    "custom_link1_url": "https://example.com/help"
                }

            Pass ``{}`` to keep all defaults. If omitted, an empty
            widgetCustomizations object is sent (required by the API).
        csp_mode (str, optional): Content Security Policy enforcement mode.
            Valid values: ``enforced``, ``report_only``, ``disabled``.
        csp_report_uri (str, optional): URI where CSP violation reports are
            sent.
        csp_src_list (List[str], optional): Allowed source origins for the
            Content Security Policy.

    Returns:
        Dict containing the updated sign-in page object, or an ``error`` key
        on failure.
replace_device_assurance_policytool Replace (fully update) an existing Device Assurance Policy.
Replace (fully update) an existing Device Assurance Policy.

    *** MANDATORY RESPONSE FORMAT — YOU MUST FOLLOW THIS EVERY TIME ***
        This tool ALWAYS returns ``"before"``, ``"after"``, and ``"changes"``
        fields. After every successful call you MUST:
        1. Present a formatted before/after comparison table to the user.
        2. For every entry in ``"changes"``, show the attribute name,
           old value, new value, and the ``"implication"`` string.
        3. NEVER reply with just "Done" or a one-line summary.
           The user must see the full comparison — always.
        4. OS VERSION — always use ``user_stated_os_version`` parameter:
           a. Do NOT put osVersion in policy_data — the tool derives it from
              user_stated_os_version after validation.
           b. Set user_stated_os_version to the EXACT characters the user
              typed, verbatim. NEVER invent or complete the version. "X.Y" and
              "X.Y.0" are NOT the same — never append a patch number yourself.
           c. If user_stated_os_version is rejected, relay the error — STOP and ask:
              "What is the exact full version in X.Y.Z format?"
           d. Do NOT call this tool until the user explicitly states the full
              X.Y.Z version.

    Use this to update minimum OS version requirements, change platform
    compliance settings, or standardise policy configurations across your
    organisation.

    Platform-specific attribute support:
        - ANDROID: name, platform, osVersion, jailbreak (false only), screenLockType
        - IOS: name, platform, osVersion, jailbreak (false only), screenLockType
        - MACOS: name, platform, osVersion, diskEncryptionType, screenLockType, secureHardwarePresent
        - WINDOWS: name, platform, osVersion, diskEncryptionType, screenLockType, secureHardwarePresent
        - CHROMEOS: name, platform, osVersion

    The response ALWAYS includes ``"before"`` and ``"after"`` state comparisons
    plus a ``"changes"`` list with security implications for each modified attribute.
    You MUST present this as a formatted confirmation summary to the user, showing
    exactly what changed and its security implication. Never simply say "Done" —
    always display the before/after comparison table.

    Parameters:
        device_assurance_id (str, required): The ID of the policy to update.
        policy_data (dict, required): The complete updated policy configuration.
            - name (str, required): The policy name.
            - platform (str, required): Target platform.
                One of: ANDROID, IOS, MACOS, WINDOWS, CHROMEOS.
            - osVersion: Do NOT include — use user_stated_os_version instead.
            - diskEncryptionType (dict, optional): Required disk encryption (MACOS, WINDOWS only).
                Format: {\"type\": \"ALL_INTERNAL_VOLUMES\"}
            - secureHardwarePresent (bool, optional): Require secure hardware (MACOS, WINDOWS only).
            - screenLockType (dict, optional): Required screen lock type (ANDROID, IOS, MACOS, WINDOWS).
                Format: {\"include\": [\"BIOMETRIC\"]} or {\"include\": [\"PASSCODE\", \"BIOMETRIC\"]}
                Note: For ANDROID, [\"PASSCODE\"] alone is not valid — must include BIOMETRIC.
            - jailbreak (bool, optional): Block jailbroken/rooted devices (IOS, ANDROID only).
                Note: Currently only accepts false value.
        user_stated_os_version (str, optional): The EXACT OS version string the user
            typed, character-for-character. Required when changing the minimum OS version.
            For ANDROID a single major version (e.g. "12") is accepted.
            For all other platforms X.Y.Z is required — X.Y alone will be rejected.

    Returns:
        Dict containing:
            - before (Dict): Policy state before the update (with securityAttributeStatus).
            - after (Dict): Policy state after the update (with securityAttributeStatus).
            - changes (List[Dict]): List of changed attributes, each with
              attribute name, before/after values, and security implication.
            - error (str): Error message if the operation fails.

    Scope/permission errors:
        If the Okta API returns HTTP 401/403 (commonly due to missing OAuth scopes),
        this tool returns ``{"error": "..."}``.
        In that case, present the error message verbatim and STOP — do not retry
        and do not attempt follow-up actions until scopes are fixed.
replace_email_customizationtool Replace an existing email customization (full update).
Replace an existing email customization (full update).

    Replaces all fields on the specified customization.  All required fields
    must be supplied; the operation is not a partial patch.  The ``body``
    must include all required Okta template variables for the template type
    or the request will be rejected with a validation error.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        customization_id (str, required): The unique identifier of the
            customization to replace.
        language (str, required): IETF BCP 47 language tag, e.g. ``"en"``.
            Must match an existing language — changing the language is not
            supported; create a new customization instead.
        subject (str, required): The updated email subject line.  Supports
            Okta template variables such as ``${org.name}``.
        body (str, required): Updated full HTML body of the email.  Must
            contain all required template variables.
        is_default (bool, optional): Whether this customization is the
            default.  Setting to ``True`` clears the flag on any other
            customization for the same template.

    Returns:
        Dict containing the updated customization, or an ``error`` key on
        failure.
replace_email_domaintool Replace the sender display name and username for an email domain.
Replace the sender display name and username for an email domain.

    Only ``display_name`` and ``user_name`` can be updated — the domain
    name itself and validation subdomain are immutable after creation.
    The domain's validation status and DNS records are preserved.

    Parameters:
        email_domain_id (str, required): Unique ID of the email domain to
            update.
        display_name (str, required): New sender display name shown in email
            clients.  Example: ``"Acme Security Team"``
        user_name (str, required): New local part of the sender address
            (before the ``@``).  Example: ``"security"``

    Returns:
        Dict containing the updated email domain object, or an ``error`` key
        on failure.
replace_email_settingstool Replace the email settings for a template.
Replace the email settings for a template.

    Updates the recipient configuration for the specified email template.
    This controls who receives emails of this type across your Okta org.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        recipients (str, required): Who should receive this email type.
            Valid values:
            - ``"ALL_USERS"`` — all users receive the email (default).
            - ``"ADMINS_ONLY"`` — only administrators receive the email.
            - ``"NO_USERS"`` — the email is disabled for all users.

    Returns:
        Dict containing the updated ``recipients`` value and ``_links``,
        or an ``error`` key on failure.
replace_preview_error_pagetool Replace (or create) the preview error page for a brand.
Replace (or create) the preview error page for a brand.

    Sets the HTML for the error page preview environment. Use this to test
    changes before publishing to the live customized error page.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        page_content (str, optional): Full HTML content of the preview error
            page. Supports Okta template variables.
        csp_mode (str, optional): Content Security Policy enforcement mode.
            Valid values: ``enforced``, ``report_only``, ``disabled``.
        csp_report_uri (str, optional): URI where CSP violation reports are
            sent.
        csp_src_list (List[str], optional): Allowed source origins for the
            Content Security Policy.

    Returns:
        Dict containing the updated preview error page object, or an ``error``
        key on failure.
replace_preview_sign_in_pagetool Replace (or create) the preview sign-in page for a brand.
Replace (or create) the preview sign-in page for a brand.

    Sets the HTML, widget version, and widget behaviour for the sign-in page
    preview environment. Use this to test changes before publishing to the
    live customized sign-in page.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        page_content (str, optional): Full HTML content of the preview sign-in
            page.
        widget_version (str, optional): Okta Sign-In Widget version.
            Accepts wildcards and ranges, e.g. ``"*"``, ``"^5"``, ``"7"``,
            ``"5.15"``.
        widget_customizations (Dict[str, Any], optional): Dict of widget
            customisation fields using snake_case keys. Pass ``{}`` to keep
            all defaults. If omitted, an empty widgetCustomizations object is
            sent (required by the API).
        csp_mode (str, optional): Content Security Policy enforcement mode.
            Valid values: ``enforced``, ``report_only``, ``disabled``.
        csp_report_uri (str, optional): URI where CSP violation reports are
            sent.
        csp_src_list (List[str], optional): Allowed source origins for the
            Content Security Policy.

    Returns:
        Dict containing the updated preview sign-in page object, or an
        ``error`` key on failure.
replace_sign_out_page_settingstool Replace the sign-out page settings for a brand.
Replace the sign-out page settings for a brand.

    Controls where users are redirected after they sign out. Set
    ``type`` to ``OKTA_DEFAULT`` to use the built-in Okta sign-out page, or
    ``EXTERNALLY_HOSTED`` to redirect users to a URL you provide.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        type (str, required): Sign-out page type. Must be one of:
            - ``OKTA_DEFAULT`` — show the Okta default sign-out page.
            - ``EXTERNALLY_HOSTED`` — redirect to ``url`` after sign-out.
        url (str, optional): The redirect URL. Required when ``type`` is
            ``EXTERNALLY_HOSTED``.

    Returns:
        Dict containing the updated sign-out page settings (``type`` and
        optionally ``url``), or an ``error`` key on failure.
send_test_emailtool Send a test email for a template to the current API user.
Send a test email for a template to the current API user.

    Triggers Okta to send a test version of the specified email template to
    the email address of the user associated with the current API token.  If
    a customization exists for the requested language, the customized version
    is sent; otherwise the Okta default content is used.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``, ``"ForgotPassword"``.
        language (str, optional): IETF BCP 47 language tag to select which
            customization to test (e.g. ``"en"``, ``"fr"``).  Defaults to
            the current API user's language if omitted.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str) on success, or an
        ``error`` key on failure.
stub_fntool
No description.
update_applicationtool Update an application by ID in the Okta organization.
Update an application by ID in the Okta organization.

    Parameters:
        app_id (str, required): The ID of the application to update
        app_config (dict, required): The updated application configuration

    Returns:
        Dictionary containing the updated application details or error information.
update_grouptool Update a group by ID in the Okta organization.
Update a group by ID in the Okta organization.

    This tool updates a group by its ID with the provided profile.

    Parameters:
        group_id (str, required): The ID of the group to update.
        profile (dict, required): The new profile for the group.

    Returns:
        List containing the updated group details.
update_policytool Update an existing policy.
Update an existing policy.

    Parameters:
        policy_id (str, required): The ID of the policy to update.
        policy_data (dict, required): The updated policy configuration.

    Returns:
        Dict containing the updated policy details.
update_policy_ruletool Update an existing policy rule.
Update an existing policy rule.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_id (str, required): The ID of the rule to update.
        rule_data (dict, required): The updated rule configuration.

    Returns:
        Dict containing the updated rule details.
update_usertool Update a user in the Okta organization.
Update a user in the Okta organization.

    This tool updates an existing user in the Okta organization with the provided profile.

    Parameters:
        user_id (str, required): The ID of the user to update.
        profile (dict, required): The updated profile of the user.

    Returns:
        List containing the updated user details.
upload_brand_theme_background_imagetool Upload and replace the background image for a theme.FilesCredentialsSensitive pathsoutside text
Upload and replace the background image for a theme.

    The file must be in PNG, JPG, or GIF format and less than 2 MB in size.
    The background image is used by touchpoint variants that reference
    ``BACKGROUND_IMAGE``.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.
        file_path (str, required): Absolute path to the image file on the server
            (e.g. ``"/tmp/background.png"``).

    Returns:
        Dict containing:
        - url (str): CDN URL of the uploaded background image.
        - error (str): Present only when the operation fails.
upload_brand_theme_favicontool Upload and replace the favicon for a theme.FilesCredentialsSensitive pathsoutside text
Upload and replace the favicon for a theme.

    The file must be in PNG, JPG, or GIF format and less than 2 MB in size.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.
        file_path (str, required): Absolute path to the image file on the server
            (e.g. ``"/tmp/my-favicon.png"``).

    Returns:
        Dict containing:
        - url (str): CDN URL of the uploaded favicon.
        - error (str): Present only when the operation fails.
upload_brand_theme_logotool Upload and replace the logo for a theme.FilesCredentialsSensitive pathsoutside text
Upload and replace the logo for a theme.

    The file must be in PNG, JPG, or GIF format and less than 100 kB. For
    best results use landscape orientation, a transparent background, and a
    minimum size of 300 × 50 px to prevent upscaling.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.
        file_path (str, required): Absolute path to the image file on the server
            (e.g. ``"/tmp/my-logo.png"``).

    Returns:
        Dict containing:
        - url (str): CDN URL of the uploaded logo.
        - error (str): Present only when the operation fails.
upsert_custom_domain_certificatetool Upload or renew the TLS certificate for a MANUAL custom domain.FilesCredentialsSensitive pathsoutside text
Upload or renew the TLS certificate for a MANUAL custom domain.

    Creates or replaces the PEM-encoded certificate for a custom domain whose
    ``certificateSourceType`` is ``MANUAL``. If the domain is currently
    ``OKTA_MANAGED``, calling this switches it to ``MANUAL`` and Okta stops
    auto-renewing the certificate.

    Okta supports TLS certificates and private keys that are PEM-encoded and
    2048, 3072, or 4096 bits.

    Parameters:
        domain_id (str, required): Unique ID of the domain.
        certificate (str, required): PEM-encoded TLS leaf certificate.
            Must start with ``-----BEGIN CERTIFICATE-----``.
        certificate_chain (str, required): PEM-encoded certificate chain.
            May include intermediate CA certificates concatenated after the
            leaf certificate, or may be identical to ``certificate`` for
            self-signed/root-signed certs.
        private_key_file_path (str, required): Path to the PEM-encoded RSA
            private key file.  The file must reside inside a permitted directory
            (default: ``/tmp`` or ``/var/tmp``; extend via the
            ``OKTA_MCP_ALLOWED_KEY_DIRS`` environment variable).
            Example: ``"/tmp/domain.key"``.
            The key is read from disk and never exposed in the conversation.
            The file must contain a key starting with
            ``-----BEGIN PRIVATE KEY-----`` or ``-----BEGIN RSA PRIVATE KEY-----``.

    Returns:
        Dict with ``success: True`` on success (204 No Content from Okta),
        or an ``error`` key on failure.
verify_custom_domaintool Verify a custom domain by checking its DNS records.
Verify a custom domain by checking its DNS records.

    Triggers Okta to verify that the TXT and CNAME records you added at your
    DNS provider match the values returned when the domain was created. DNS
    changes can take time to propagate — if verification fails immediately
    after adding records, wait a few minutes and try again.

    After a successful verification:
    - ``validationStatus`` becomes ``VERIFIED`` (or ``COMPLETED`` once the
      certificate is also installed).
    - If ``certificateSourceType`` is ``OKTA_MANAGED``, Okta also provisions
      and installs a TLS certificate automatically.

    Parameters:
        domain_id (str, required): Unique ID of the domain to verify.

    Returns:
        Dict containing the updated domain object with the new
        ``validationStatus``, or an ``error`` key on failure.
        ``validationStatus`` will be ``FAILED_TO_VERIFY`` when DNS records
        are not yet reachable; retry after DNS propagation.
verify_email_domaintool Verify an email domain by checking its DNS records.
Verify an email domain by checking its DNS records.

    Okta looks up the DNS records that were returned when the domain was
    created and verifies that they are correctly published.  On success the
    domain's ``validationStatus`` transitions to ``VERIFIED`` and Okta begins
    routing email through your custom sender address.

    Prerequisites:
        All four DNS records (one TXT + three CNAMEs) from
        ``dnsValidationRecords`` must be published at your DNS provider before
        calling this tool.  DNS propagation can take up to 48 hours.

    Parameters:
        email_domain_id (str, required): Unique ID of the email domain to
            verify.

    Returns:
        Dict containing the updated email domain object with the new
        ``validationStatus``, or an ``error`` key if verification fails
        (e.g. DNS records not found).

    Common ``validationStatus`` values after this call:
    - ``VERIFIED``    – DNS records were found; domain is active.
    - ``POLLING``     – Okta is still checking; call again shortly.
    - ``ERROR``       – Verification failed; check your DNS configuration.

Text the model reads (114)

Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.

get_scope_status tool
Report which Okta MCP tools are active and which are disabled due to missing OAuth scopes.

    Call this tool whenever:
    - A user asks you to perform an Okta operation but no matching tool is available.
    - You are unsure whether a capability is supported.
    - You want to explain why a specific action cannot be performed.

    Returns a dict with:
    - ``configured_scopes``: list of OAuth scopes present in the token at startup.
    - ``disabled_tools``: dict mapping each disabled tool name to the scope it requires.
    - ``instructions``: actionable steps the user must take to enable the missing tools.

    IMPORTANT: If the user asks you to perform an action and the required tool appears
    in ``disabled_tools``, do NOT attempt the operation. Instead, tell the user:
    "This tool is not available because the scope '<scope>' is missing from your token.
    Follow the instructions below to enable it and restart the MCP server."
list_applications tool
List all applications from the Okta organization.

    Parameters:
        q (str, optional): Searches for applications by label, property, or link
        after (str, optional): Specifies the pagination cursor for the next page of results
        limit (int, optional): Specifies the number of results per page (min 20, max 100)
        filter (str, optional): Filters applications by status, user.id, group.id, or credentials.signing.kid
        expand (str, optional): Expands the app user object to include the user's profile or expand the app group
        object to include the group's profile
        include_non_deleted (bool, optional): Include non-deleted applications in the results
        fetch_all (bool, optional): If True, automatically fetch all pages of results. Default: False.

    Examples:
        For pagination:
        - First call: list_applications()
        - Next page: list_applications(after="cursor_value")
        - All pages: list_applications(fetch_all=True)

    Returns:
        Dict containing:
        - items: List of application objects
        - total_fetched: Number of applications returned
        - has_more: Boolean indicating if more results are available
        - next_cursor: Cursor for the next page (if has_more is True)
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
get_application tool
Get an application by ID from the Okta organization.

    Parameters:
        app_id (str, required): The ID of the application to retrieve
        expand (str, optional): Expands the app user object to include the user's profile or expand the
        app group object

    Returns:
        Dictionary containing the application details or error information.
create_application tool
Create a new application in the Okta organization.

    Parameters:
        app_config (dict, required): The application configuration including name, label, signOnMode, settings, etc.
        activate (bool, optional): Execute activation lifecycle operation after creation. Defaults to True.

    Returns:
        Dictionary containing the created application details or error information.
update_application tool
Update an application by ID in the Okta organization.

    Parameters:
        app_id (str, required): The ID of the application to update
        app_config (dict, required): The updated application configuration

    Returns:
        Dictionary containing the updated application details or error information.
delete_application tool
Delete an application by ID from the Okta organization.

    This tool deletes an application by its ID from the Okta organization.
    The user will be asked for confirmation before the deletion proceeds.

    Parameters:
        app_id (str, required): The ID of the application to delete

    Returns:
        List containing the result of the deletion operation.
confirm_delete_application tool
Confirm and execute application deletion after receiving confirmation.

    .. deprecated::
        This tool exists for backward compatibility with clients that do not
        support MCP elicitation.  New clients should rely on the built-in
        elicitation prompt in ``delete_application`` instead.

    This function MUST ONLY be called after the human user has explicitly typed 'DELETE' as confirmation.
    NEVER call this function automatically after delete_application.

    Parameters:
        app_id (str, required): The ID of the application to delete
        confirmation (str, required): Must be 'DELETE' to confirm deletion

    Returns:
        List containing the result of the deletion operation.
activate_application tool
Activate an application in the Okta organization.

    Parameters:
        app_id (str, required): The ID of the application to activate

    Returns:
        List containing the result of the activation operation.
deactivate_application tool
Deactivate an application in the Okta organization.

    Parameters:
        app_id (str, required): The ID of the application to deactivate

    Returns:
        List containing the result of the deactivation operation.
list_catalog_apps tool
Browse the Okta Integration Network (OIN) app catalog.

    Use this to discover an app's ``name`` (the catalog key) to pass to
    install_oin_app. Apps that support outbound provisioning list a provisioning
    capability in their ``features`` (e.g. a SCIM 2.0 test app). A plain custom
    SAML/OIDC app created with create_application cannot do provisioning; you need
    an installed instance of a provisioning-capable catalog app.

    Parameters:
        q (str, optional): Filters the catalog by app name/keyword (e.g. "scim")
        after (str, optional): Pagination cursor — the ``name`` of the last
            entry of the previous page (returned as ``next_cursor``)
        limit (int, optional): Number of catalog entries per page (server
            default: 20)
        fetch_all (bool, optional): If True, automatically fetch all pages of
            results. The unfiltered catalog holds thousands of entries and can
            take hundreds of sequential requests — strongly prefer combining
            this with ``q``. Default: False.

    Examples:
        For pagination:
        - First call: list_catalog_apps(q="scim")
        - Next page: list_catalog_apps(q="scim", after="cursor_value")
        - All pages: list_catalog_apps(q="scim", fetch_all=True)

    Returns:
        Dict containing:
        - items: List of catalog entries (each has ``name``, ``displayName``,
          ``features``, ``signOnModes``)
        - total_fetched: Number of entries returned
        - has_more: Boolean indicating if more results are available. May be
          conservatively True when the final page is exactly full — an empty
          next page then confirms the end.
        - next_cursor: Cursor for the next page (if has_more is True). Also
          set when fetch_all stopped early, as the resume point.
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
get_catalog_app tool
Get a single OIN catalog app definition (including its provisioning schema).

    Parameters:
        app_name (str, required): The catalog app key (from list_catalog_apps)

    Returns:
        Dict with the catalog app definition, or error information.
install_oin_app tool
Install an instance of an OIN catalog app (e.g. a provisioning-capable SCIM app).

    Unlike create_application (which builds custom apps), this preserves the
    catalog ``name`` key. The typed SDK create path strips ``name`` from the
    request body, so a catalog/OIN app can't be installed through create_application;
    this issues the request directly. Provisioning capability is determined by the
    catalog app definition at install time — it cannot be added to a custom app
    afterwards. Discover ``name`` and the allowed ``signOnMode`` values via
    list_catalog_apps / get_catalog_app.

    Parameters:
        name (str, required): The OIN catalog app key (e.g. from list_catalog_apps)
        label (str, required): Display label for the installed instance
        sign_on_mode (str, required): A sign-on mode the catalog app supports
            (e.g. SAML_2_0, OPENID_CONNECT, SECURE_PASSWORD_STORE, BOOKMARK)
        settings (dict, optional): Additional app settings/profile some OIN apps require
        activate (bool, optional): Activate the app on creation. Defaults to True.

    Returns:
        Dict with the installed application, or error information.
list_brands tool
List all brands in the Okta organization with pagination support.

    Parameters:
        expand (List[str], optional): Additional metadata to embed in each brand object.
            Valid values: "themes", "domains", "emailDomain".
            Example: ["themes", "emailDomain"]
        after (str, optional): Opaque pagination cursor obtained from the ``next_cursor``
            field of a previous response. Used to fetch the next page.
        limit (int, optional): Maximum number of brands to return per page (1–200).
            Defaults to 20 when omitted.
        q (str, optional): Case-insensitive search string that filters brands by name.
        fetch_all (bool, optional): When True the tool automatically follows pagination
            links and returns all brands in a single response. Default: False.

    Examples:
        - First page, no extras:   list_brands()
        - Include theme data:      list_brands(expand=["themes"])
        - Search by name:          list_brands(q="Default")
        - Next page manually:      list_brands(after="<cursor>")
        - All brands at once:      list_brands(fetch_all=True)

    Returns:
        Dict containing:
        - items (List[Dict]): List of brand objects.
        - total_fetched (int): Number of brands in this response.
        - has_more (bool): True if additional pages are available.
        - next_cursor (str | None): Cursor value for the next page.
        - fetch_all_used (bool): True when fetch_all was used.
        - pagination_info (Dict): Detailed stats when fetch_all=True.
get_brand tool
Retrieve a specific brand by its ID.

    Parameters:
        brand_id (str, required): The unique identifier of the brand (e.g. ``bnd114iNkrcN6aR680g4``).
        expand (List[str], optional): Additional metadata to embed in the response.
            Valid values: "themes", "domains", "emailDomain".

    Returns:
        Dict containing the brand object, or an ``error`` key on failure.
create_brand tool
Create a new brand in the Okta organization.

    A brand controls the look-and-feel of the sign-in page, error pages,
    email templates, and the End-User Dashboard.  After creation you can
    customise it further with ``replace_brand`` and the Themes API.

    Parameters:
        name (str, required): Display name for the new brand.
            Must be unique within the org.
            The reserved name ``DRAPP_DOMAIN_BRAND`` is not allowed.

    Returns:
        Dict containing the newly created brand object, or an ``error`` key on failure.
replace_brand tool
Replace (fully update) a brand by its ID.

    This is a full replacement (HTTP PUT). Every writable field in the brand
    will be overwritten — omitted optional fields revert to their defaults.

    Parameters:
        brand_id (str, required): The unique identifier of the brand to update.
        name (str, required): New display name for the brand.
            The reserved name ``DRAPP_DOMAIN_BRAND`` is not allowed.
        agree_to_custom_privacy_policy (bool, optional): Must be ``True`` when
            providing a ``custom_privacy_policy_url``. Not required when clearing
            the URL.
        custom_privacy_policy_url (str, optional): HTTPS URL of your custom
            privacy policy page.  Requires ``agree_to_custom_privacy_policy=True``.
            Pass ``null`` / omit to reset to the Okta default.
        remove_powered_by_okta (bool, optional): When ``True``, removes the
            "Powered by Okta" footer from the sign-in page and the End-User
            Dashboard.  Defaults to ``False``.
        locale (str, optional): IETF BCP 47 language tag for the brand's locale
            (e.g. ``"en"``, ``"fr"``, ``"de"``).
        email_domain_id (str, optional): ID of an email domain to associate with
            this brand (controls the ``From`` address for brand emails).
        default_app (dict, optional): The application shown by default when a
            user navigates to the brand's Okta-hosted domain.  Accepted keys:
            - ``appInstanceId`` (str | None): ID of the app instance.
            - ``appLinkName`` (str | None): App link name.
            - ``classicApplicationUri`` (str | None): URI for classic (Okta1) apps.

    Returns:
        Dict containing the updated brand object, or an ``error`` key on failure.
delete_brand tool
Delete a brand by its ID.

    The user is asked to confirm before the deletion is carried out.
    The default (Okta) brand cannot be deleted — the API will return a 409
    error in that case.

    Parameters:
        brand_id (str, required): The unique identifier of the brand to delete.

    Returns:
        Dict with a ``message`` key on success, or an ``error`` key on failure.
list_brand_domains tool
List all custom domains associated with a brand.

    Each brand can have one or more domains.  The default Okta subdomain
    (e.g. ``yourorg.okta.com``) is always present; additional custom domains
    appear here once they have been verified and activated.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing:
        - domains (List[Dict]): List of domain objects associated with the brand.
          Each domain object includes: ``id``, ``domain``, ``certificateSourceType``,
          ``validationStatus``, ``brandId``, and ``_links``.
        - total_fetched (int): Number of domains returned.
        - error (str): Present only when the operation fails.
list_custom_domains tool
List all custom domains in the Okta organization.

    Returns all custom domains including the default Okta subdomain (id:
    ``"default"``). The API does not support pagination — all domains are
    returned in a single response.

    Each domain object includes:
    - ``id``                   – Unique domain ID (``"default"`` for the org base domain).
    - ``domain``               – The fully qualified domain name.
    - ``brandId``              – ID of the brand associated with this domain.
    - ``certificateSourceType``– ``"MANUAL"`` or ``"OKTA_MANAGED"``.
    - ``validationStatus``     – ``NOT_STARTED`` | ``IN_PROGRESS`` | ``VERIFIED`` |
                                 ``COMPLETED`` | ``FAILED_TO_VERIFY``.
    - ``dnsRecords``           – DNS records to configure at your DNS provider
                                 (TXT + CNAME, present until domain is verified).
    - ``publicCertificate``    – Certificate metadata (present after verification).

    Returns:
        Dict containing:
        - domains (List[Dict]): List of domain objects.
        - total_fetched (int): Number of domains returned.
        - error (str): Present only when the operation fails.
create_custom_domain tool
Create a new custom domain for the Okta organization.

    After creating a domain, the response includes DNS records (TXT + CNAME)
    that you must configure at your DNS provider before calling
    ``verify_custom_domain``. Okta does not automatically verify domains.

    Parameters:
        domain (str, required): Fully qualified custom domain name.
            Example: ``"login.example.com"``
            Note: The reserved ``drapp.{orgSubdomain}.okta.com`` pattern is not allowed.
        certificate_source_type (str, required): Who manages the TLS certificate.
            - ``"MANUAL"``       – You supply the certificate via
              ``upsert_custom_domain_certificate``. DNS verification uses a
              TXT record only.
            - ``"OKTA_MANAGED"`` – Okta automatically provisions and renews
              the certificate. After DNS verification succeeds, Okta installs
              the certificate.

    Returns:
        Dict containing the newly created domain object (including DNS records
        to configure), or an ``error`` key on failure.
get_custom_domain tool
Retrieve a custom domain by its ID.

    Parameters:
        domain_id (str, required): Unique ID of the domain
            (e.g. ``"OcDz6iRyjkaCTXkdo0g3"``). Use ``"default"`` to retrieve
            the org's default Okta subdomain.

    Returns:
        Dict containing the domain object, or an ``error`` key on failure.
replace_custom_domain tool
Replace the brand associated with a custom domain.

    Associates a different brand with the given custom domain. The brand
    controls the look-and-feel of the sign-in page and email templates served
    under that domain.

    Constraints:
    - The default brand (``isDefault: true``) cannot be mapped to a custom
      domain (API returns 409).
    - The PUT is allowed regardless of the domain's ``validationStatus``;
      the brand association can be changed at any point in the domain lifecycle.

    Parameters:
        domain_id (str, required): Unique ID of the domain to update.
        brand_id (str, required): ID of the brand to associate.

    Returns:
        Dict containing the updated domain object, or an ``error`` key on failure.
delete_custom_domain tool
Delete a custom domain by its ID.

    Permanently removes the custom domain from the organization. The default
    org domain (``id: "default"``) cannot be deleted. A confirmation prompt
    is shown before proceeding.

    Parameters:
        domain_id (str, required): Unique ID of the domain to delete.

    Returns:
        Dict with ``success: True`` and a confirmation message on success,
        ``success: False`` if cancelled, or an ``error`` key on failure.
upsert_custom_domain_certificate tool
Upload or renew the TLS certificate for a MANUAL custom domain.

    Creates or replaces the PEM-encoded certificate for a custom domain whose
    ``certificateSourceType`` is ``MANUAL``. If the domain is currently
    ``OKTA_MANAGED``, calling this switches it to ``MANUAL`` and Okta stops
    auto-renewing the certificate.

    Okta supports TLS certificates and private keys that are PEM-encoded and
    2048, 3072, or 4096 bits.

    Parameters:
        domain_id (str, required): Unique ID of the domain.
        certificate (str, required): PEM-encoded TLS leaf certificate.
            Must start with ``-----BEGIN CERTIFICATE-----``.
        certificate_chain (str, required): PEM-encoded certificate chain.
            May include intermediate CA certificates concatenated after the
            leaf certificate, or may be identical to ``certificate`` for
            self-signed/root-signed certs.
        private_key_file_path (str, required): Path to the PEM-encoded RSA
            private key file.  The file must reside inside a permitted directory
            (default: ``/tmp`` or ``/var/tmp``; extend via the
            ``OKTA_MCP_ALLOWED_KEY_DIRS`` environment variable).
            Example: ``"/tmp/domain.key"``.
            The key is read from disk and never exposed in the conversation.
            The file must contain a key starting with
            ``-----BEGIN PRIVATE KEY-----`` or ``-----BEGIN RSA PRIVATE KEY-----``.

    Returns:
        Dict with ``success: True`` on success (204 No Content from Okta),
        or an ``error`` key on failure.
verify_custom_domain tool
Verify a custom domain by checking its DNS records.

    Triggers Okta to verify that the TXT and CNAME records you added at your
    DNS provider match the values returned when the domain was created. DNS
    changes can take time to propagate — if verification fails immediately
    after adding records, wait a few minutes and try again.

    After a successful verification:
    - ``validationStatus`` becomes ``VERIFIED`` (or ``COMPLETED`` once the
      certificate is also installed).
    - If ``certificateSourceType`` is ``OKTA_MANAGED``, Okta also provisions
      and installs a TLS certificate automatically.

    Parameters:
        domain_id (str, required): Unique ID of the domain to verify.

    Returns:
        Dict containing the updated domain object with the new
        ``validationStatus``, or an ``error`` key on failure.
        ``validationStatus`` will be ``FAILED_TO_VERIFY`` when DNS records
        are not yet reachable; retry after DNS propagation.
get_error_page_resources tool
Retrieve the error page sub-resource links for a brand.

    Returns navigation links (``_links``) for the customized, default, and
    preview error pages. Pass one or more values in ``expand`` to embed the
    full page content of those sub-resources inline in the response.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        expand (List[str], optional): Sub-resources to embed. Valid values:
            ``default``, ``customized``, ``customizedUrl``, ``preview``,
            ``previewUrl``.

    Returns:
        Dict containing ``_links`` (and optionally ``_embedded``) describing
        the available error page resources, or an ``error`` key on failure.
get_customized_error_page tool
Retrieve the customized error page for a brand.

    The customized error page is what end-users see in the live environment
    when an error occurs. Returns 404 if no customization exists (the default
    page is in use).

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent`` (HTML string) and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
replace_customized_error_page tool
Replace (or create) the customized error page for a brand.

    Sets the HTML that appears in the live environment when an error occurs.
    Replaces the entire customized page; any fields omitted revert to their
    defaults.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        page_content (str, optional): Full HTML content of the error page.
            Supports Okta template variables such as ``{{errorSummary}}``,
            ``{{errorDescription}}``, ``{{buttonText}}``, and
            ``{{{ErrorPageResources}}}``.
        csp_mode (str, optional): Content Security Policy enforcement mode.
            Valid values: ``enforced``, ``report_only``, ``disabled``.
        csp_report_uri (str, optional): URI where CSP violation reports are
            sent.
        csp_src_list (List[str], optional): Allowed source origins for the
            Content Security Policy.

    Returns:
        Dict containing the updated error page object, or an ``error`` key on
        failure.
delete_customized_error_page tool
Delete the customized error page for a brand.

    Removes the customized error page so the Okta default error page is shown
    in the live environment. Requires explicit confirmation before proceeding.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
get_default_error_page tool
Retrieve the default (Okta-provided) error page for a brand.

    The default error page is shown when no customized error page exists. It
    cannot be modified; use ``replace_customized_error_page`` to override it.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent`` (HTML string) and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
get_preview_error_page tool
Retrieve the preview error page for a brand.

    The preview page is a sandbox for testing error page changes before they
    go live. Returns 404 if no preview exists.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent`` (HTML string) and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
replace_preview_error_page tool
Replace (or create) the preview error page for a brand.

    Sets the HTML for the error page preview environment. Use this to test
    changes before publishing to the live customized error page.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        page_content (str, optional): Full HTML content of the preview error
            page. Supports Okta template variables.
        csp_mode (str, optional): Content Security Policy enforcement mode.
            Valid values: ``enforced``, ``report_only``, ``disabled``.
        csp_report_uri (str, optional): URI where CSP violation reports are
            sent.
        csp_src_list (List[str], optional): Allowed source origins for the
            Content Security Policy.

    Returns:
        Dict containing the updated preview error page object, or an ``error``
        key on failure.
delete_preview_error_page tool
Delete the preview error page for a brand.

    Removes the preview error page. The preview environment will fall back to
    the default error page. Requires explicit confirmation before proceeding.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
get_sign_in_page_resources tool
Retrieve the sign-in page sub-resource links for a brand.

    Returns navigation links (``_links``) for the customized, default, and
    preview sign-in pages. Pass one or more values in ``expand`` to embed the
    full page content of those sub-resources inline in the response.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        expand (List[str], optional): Sub-resources to embed. Valid values:
            ``default``, ``customized``, ``customizedUrl``, ``preview``,
            ``previewUrl``.

    Returns:
        Dict containing ``_links`` (and optionally ``_embedded``) describing
        the available sign-in page resources, or an ``error`` key on failure.
get_customized_sign_in_page tool
Retrieve the customized sign-in page for a brand.

    The customized sign-in page is what end-users see in the live environment.
    Returns 404 if no customization exists (the default page is in use).

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent``, ``widgetVersion``,
        ``widgetCustomizations``, and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
replace_customized_sign_in_page tool
Replace (or create) the customized sign-in page for a brand.

    Sets the HTML, widget version, and widget behaviour that appear in the
    live environment. The ``widgetCustomizations`` parameter lets you control
    labels, links, and toggles shown in the Okta sign-in widget.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        page_content (str, optional): Full HTML content of the sign-in page.
        widget_version (str, optional): Okta Sign-In Widget version.
            Accepts wildcards and ranges, e.g. ``"*"``, ``"^5"``, ``"7"``,
            ``"5.15"``. Use ``list_sign_in_widget_versions`` to see available
            values.
        widget_customizations (Dict[str, Any], optional): Dict of widget
            customisation fields using snake_case keys, for example::

                {
                    "sign_in_label": "Log in",
                    "forgot_password_label": "Reset password",
                    "forgot_password_url": "https://example.com/reset",
                    "show_password_visibility_toggle": True,
                    "show_user_identifier": True,
                    "custom_link1_label": "Help",
                    "custom_link1_url": "https://example.com/help"
                }

            Pass ``{}`` to keep all defaults. If omitted, an empty
            widgetCustomizations object is sent (required by the API).
        csp_mode (str, optional): Content Security Policy enforcement mode.
            Valid values: ``enforced``, ``report_only``, ``disabled``.
        csp_report_uri (str, optional): URI where CSP violation reports are
            sent.
        csp_src_list (List[str], optional): Allowed source origins for the
            Content Security Policy.

    Returns:
        Dict containing the updated sign-in page object, or an ``error`` key
        on failure.
delete_customized_sign_in_page tool
Delete the customized sign-in page for a brand.

    Removes the customized sign-in page so the Okta default sign-in page is
    shown in the live environment. Requires explicit confirmation before
    proceeding.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
get_default_sign_in_page tool
Retrieve the default (Okta-provided) sign-in page for a brand.

    The default sign-in page is shown when no customized page exists. It
    cannot be modified; use ``replace_customized_sign_in_page`` to override
    it.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent``, ``widgetVersion``,
        ``widgetCustomizations``, and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
get_preview_sign_in_page tool
Retrieve the preview sign-in page for a brand.

    The preview page is a sandbox for testing sign-in page changes before
    they go live. Returns 404 if no preview exists.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing ``pageContent``, ``widgetVersion``,
        ``widgetCustomizations``, and optionally
        ``contentSecurityPolicySetting``, or an ``error`` key on failure.
replace_preview_sign_in_page tool
Replace (or create) the preview sign-in page for a brand.

    Sets the HTML, widget version, and widget behaviour for the sign-in page
    preview environment. Use this to test changes before publishing to the
    live customized sign-in page.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        page_content (str, optional): Full HTML content of the preview sign-in
            page.
        widget_version (str, optional): Okta Sign-In Widget version.
            Accepts wildcards and ranges, e.g. ``"*"``, ``"^5"``, ``"7"``,
            ``"5.15"``.
        widget_customizations (Dict[str, Any], optional): Dict of widget
            customisation fields using snake_case keys. Pass ``{}`` to keep
            all defaults. If omitted, an empty widgetCustomizations object is
            sent (required by the API).
        csp_mode (str, optional): Content Security Policy enforcement mode.
            Valid values: ``enforced``, ``report_only``, ``disabled``.
        csp_report_uri (str, optional): URI where CSP violation reports are
            sent.
        csp_src_list (List[str], optional): Allowed source origins for the
            Content Security Policy.

    Returns:
        Dict containing the updated preview sign-in page object, or an
        ``error`` key on failure.
delete_preview_sign_in_page tool
Delete the preview sign-in page for a brand.

    Removes the preview sign-in page. The preview environment will fall back
    to the default sign-in page. Requires explicit confirmation before
    proceeding.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
list_sign_in_widget_versions tool
List all available Okta Sign-In Widget versions for a brand.

    Returns the version strings that can be used in the ``widget_version``
    parameter of ``replace_customized_sign_in_page`` and
    ``replace_preview_sign_in_page``. Includes both specific versions and
    range expressions.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing:
        - versions (List[str]): Available widget version strings,
          e.g. ``["5.15", "^5", "6.0", "7", "*"]``.
        - total_fetched (int): Number of versions returned.
        - error (str): Present only when the operation fails.
get_sign_out_page_settings tool
Retrieve the sign-out page settings for a brand.

    Returns the current sign-out page configuration, which controls where
    users are redirected after signing out.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.

    Returns:
        Dict containing:
        - type (str): ``OKTA_DEFAULT`` (show the Okta default sign-out page)
          or ``EXTERNALLY_HOSTED`` (redirect to a custom URL).
        - url (str): The redirect URL, present only when type is
          ``EXTERNALLY_HOSTED``.
        - error (str): Present only when the operation fails.
replace_sign_out_page_settings tool
Replace the sign-out page settings for a brand.

    Controls where users are redirected after they sign out. Set
    ``type`` to ``OKTA_DEFAULT`` to use the built-in Okta sign-out page, or
    ``EXTERNALLY_HOSTED`` to redirect users to a URL you provide.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        type (str, required): Sign-out page type. Must be one of:
            - ``OKTA_DEFAULT`` — show the Okta default sign-out page.
            - ``EXTERNALLY_HOSTED`` — redirect to ``url`` after sign-out.
        url (str, optional): The redirect URL. Required when ``type`` is
            ``EXTERNALLY_HOSTED``.

    Returns:
        Dict containing the updated sign-out page settings (``type`` and
        optionally ``url``), or an ``error`` key on failure.
list_email_templates tool
List all email templates for a brand with pagination support.

    Returns every Okta-managed email template available on the brand.  By
    default each entry contains only the template ``name`` and ``_links``.
    Use ``expand`` to embed additional metadata inline.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        expand (List[str], optional): Additional metadata to embed in each
            template object.  Valid values: ``"settings"`` (embed the
            recipients setting) and ``"customizationCount"`` (embed the
            number of active customizations).
        after (str, optional): Pagination cursor for the next page.
        fetch_all (bool, optional): If True, automatically fetch all pages. Default: False.

    Returns:
        Dict containing:
        - items (List[Dict]): Template dicts (``name``, ``_links``, optionally ``_embedded``).
        - total_fetched (int): Number of templates returned.
        - has_more (bool): Whether more results are available.
        - next_cursor (str | None): Cursor for the next page.
        - fetch_all_used (bool): Whether fetch_all was used.
        - pagination_info (Dict): Detailed metadata (when fetch_all=True).
        - error (str): Present only when the operation fails.
get_email_template tool
Retrieve a single email template for a brand.

    Returns the named Okta email template with its navigation links.  Pass
    ``expand`` to embed settings or customization count inline.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``, ``"ForgotPassword"``,
            ``"PasswordResetByAdmin"``.
        expand (List[str], optional): Additional metadata to embed.  Valid
            values: ``"settings"`` and ``"customizationCount"``.

    Returns:
        Dict containing ``name``, ``_links``, and optionally ``_embedded``
        with the expanded data, or an ``error`` key on failure.
list_email_customizations tool
List all customizations for an email template with pagination support.

    Returns every language variant that has been created for the specified
    email template.  Each entry includes the full customization body,
    subject, language, ``isDefault`` flag, and timestamps.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``, ``"ForgotPassword"``.
        after (str, optional): Pagination cursor for the next page.
        fetch_all (bool, optional): If True, automatically fetch all pages. Default: False.

    Returns:
        Dict containing:
        - items (List[Dict]): Customization dicts (may be empty if none exist).
        - total_fetched (int): Number of customizations returned.
        - has_more (bool): Whether more results are available.
        - next_cursor (str | None): Cursor for the next page.
        - fetch_all_used (bool): Whether fetch_all was used.
        - pagination_info (Dict): Detailed metadata (when fetch_all=True).
        - error (str): Present only when the operation fails.
create_email_customization tool
Create a new language customization for an email template.

    Adds a new localized variant for the specified email template.  Only one
    customization per language is allowed — creating a duplicate language
    returns a 409 Conflict error.  The first customization created for a
    template automatically becomes the default (``isDefault=True``); subsequent
    ones default to ``False``.

    The ``body`` must be valid HTML and **must** include all required Okta
    template variables for the template type.  For example, ``UserActivation``
    requires ``${activationLink}`` or ``${activationToken}``.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``, ``"ForgotPassword"``.
        language (str, required): IETF BCP 47 language tag, e.g. ``"en"``,
            ``"fr"``, ``"de"``, ``"es"``.
        subject (str, required): The email subject line.  Supports Okta
            template variables such as ``${org.name}``.
        body (str, required): Full HTML body of the email.  Must contain all
            required Okta template variables for this template type.
        is_default (bool, optional): Whether this customization is the default
            for the template.  Only one customization may be the default at a
            time; setting this to ``True`` clears the flag on any other
            customization.

    Returns:
        Dict containing the created customization (``id``, ``language``,
        ``subject``, ``body``, ``isDefault``, ``created``, ``lastUpdated``,
        ``_links``), or an ``error`` key on failure.
get_email_customization tool
Retrieve a specific email customization by its ID.

    Returns the full customization object including the HTML body, subject,
    language, ``isDefault`` status, and timestamps.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        customization_id (str, required): The unique identifier of the
            customization.

    Returns:
        Dict containing ``id``, ``language``, ``subject``, ``body``,
        ``isDefault``, ``created``, ``lastUpdated``, and ``_links``,
        or an ``error`` key on failure.
replace_email_customization tool
Replace an existing email customization (full update).

    Replaces all fields on the specified customization.  All required fields
    must be supplied; the operation is not a partial patch.  The ``body``
    must include all required Okta template variables for the template type
    or the request will be rejected with a validation error.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        customization_id (str, required): The unique identifier of the
            customization to replace.
        language (str, required): IETF BCP 47 language tag, e.g. ``"en"``.
            Must match an existing language — changing the language is not
            supported; create a new customization instead.
        subject (str, required): The updated email subject line.  Supports
            Okta template variables such as ``${org.name}``.
        body (str, required): Updated full HTML body of the email.  Must
            contain all required template variables.
        is_default (bool, optional): Whether this customization is the
            default.  Setting to ``True`` clears the flag on any other
            customization for the same template.

    Returns:
        Dict containing the updated customization, or an ``error`` key on
        failure.
delete_email_customization tool
Delete a specific email customization.

    Permanently removes the specified language customization from the email
    template.  Requires explicit confirmation before proceeding.  If this
    is the only customization (i.e. the default), you may need to delete all
    customizations instead; deleting the sole default customization may
    return an error — use ``delete_all_email_customizations`` in that case.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        customization_id (str, required): The unique identifier of the
            customization to delete.
        language (str, optional): The language of the customization (e.g.
            ``"en"``).  Used only in the confirmation prompt — does not
            affect which record is deleted.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
delete_all_email_customizations tool
Delete ALL customizations for an email template.

    Permanently removes every language variant from the specified email
    template, reverting it to Okta's built-in default content.  This is
    irreversible and cannot be undone.  Requires explicit confirmation.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name whose
            customizations will all be deleted, e.g. ``"UserActivation"``.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str), or an ``error``
        key on failure.
get_email_customization_preview tool
Preview a rendered email customization.

    Returns the customization with all Okta template variables replaced by
    representative sample values.  Useful for verifying how the email will
    appear to recipients before publishing.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        customization_id (str, required): The unique identifier of the
            customization to preview.

    Returns:
        Dict containing ``subject`` and ``body`` with all template variables
        rendered, plus ``_links``, or an ``error`` key on failure.
get_email_default_content tool
Retrieve the Okta default content for an email template.

    Returns the unmodified Okta-provided subject and body for the specified
    template.  This is the fallback content shown when no customization
    exists for a given language.  Useful for inspecting the baseline before
    creating a customization.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        language (str, optional): IETF BCP 47 language tag to retrieve the
            default content for.  Defaults to the current API user's language
            if omitted.

    Returns:
        Dict containing ``subject``, ``body``, and ``_links``, or an
        ``error`` key on failure.
get_email_default_content_preview tool
Preview the rendered Okta default content for an email template.

    Returns the Okta default subject and body with all template variables
    replaced by representative sample values.  Unlike
    ``get_email_default_content``, all ``${variable}`` placeholders are
    substituted with real-looking data so you can see exactly what an end
    user would receive.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        language (str, optional): IETF BCP 47 language tag for the preview.
            Defaults to the current API user's language if omitted.

    Returns:
        Dict containing ``subject`` and ``body`` (fully rendered), plus
        ``_links``, or an ``error`` key on failure.
get_email_settings tool
Retrieve the email settings for a template.

    Returns the recipient configuration for the specified email template,
    controlling which user populations will receive emails of this type.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.

    Returns:
        Dict containing ``recipients`` (one of ``"ALL_USERS"``,
        ``"ADMINS_ONLY"``, ``"NO_USERS"``) and ``_links``, or an ``error``
        key on failure.
replace_email_settings tool
Replace the email settings for a template.

    Updates the recipient configuration for the specified email template.
    This controls who receives emails of this type across your Okta org.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``.
        recipients (str, required): Who should receive this email type.
            Valid values:
            - ``"ALL_USERS"`` — all users receive the email (default).
            - ``"ADMINS_ONLY"`` — only administrators receive the email.
            - ``"NO_USERS"`` — the email is disabled for all users.

    Returns:
        Dict containing the updated ``recipients`` value and ``_links``,
        or an ``error`` key on failure.
send_test_email tool
Send a test email for a template to the current API user.

    Triggers Okta to send a test version of the specified email template to
    the email address of the user associated with the current API token.  If
    a customization exists for the requested language, the customized version
    is sent; otherwise the Okta default content is used.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        template_name (str, required): The Okta template name, e.g.
            ``"UserActivation"``, ``"ForgotPassword"``.
        language (str, optional): IETF BCP 47 language tag to select which
            customization to test (e.g. ``"en"``, ``"fr"``).  Defaults to
            the current API user's language if omitted.

    Returns:
        Dict with ``success`` (bool) and ``message`` (str) on success, or an
        ``error`` key on failure.
list_email_domains tool
List all email domains in the Okta organization.

    Returns every Email Domain configured in the org.  Each domain shows
    its current validation status and the DNS records that must be published
    to complete verification.

    Parameters:
        expand_brands (bool, optional): When ``True``, embeds associated Brand
            objects in ``_embedded.brands`` for each returned domain.
            Default: ``False``.

    Returns:
        Dict containing:
        - ``email_domains`` (List[Dict]): List of email domain objects.
        - ``total_fetched`` (int): Number of domains returned.
        - ``error`` (str): Present only when the operation fails.

    Each email domain object includes:
    - ``id``                   – Unique email domain ID.
    - ``domain``               – The custom domain (e.g. ``"example.com"``).
    - ``displayName``          – Sender display name (e.g. ``"Acme IT"``).
    - ``userName``             – Local part of sender address (e.g. ``"noreply"``).
    - ``validationSubdomain``  – Mail subdomain prefix (default ``"mail"``).
    - ``validationStatus``     – ``NOT_STARTED`` | ``POLLING`` | ``VERIFIED`` |
                                 ``ERROR`` | ``DELETED``.
    - ``dnsValidationRecords`` – DNS records to publish: ``recordType``,
                                 ``fqdn``, ``verificationValue``.
    - ``_embedded.brands``     – Associated Brand objects (when
                                 ``expand_brands=True``).
create_email_domain tool
Create a new email domain for the Okta organization.

    After creation the response includes DNS records (one TXT record and
    three CNAME records) that you must publish at your DNS provider.  Call
    ``verify_email_domain`` once the records are live to complete setup.

    Parameters:
        brand_id (str, required): ID of the Brand to associate with this
            email domain.  Example: ``"bnd1ab2cde3fGhIJK4l5"``
        domain (str, required): The custom domain to send email from.
            Example: ``"yourcompany.com"``
        display_name (str, required): The sender name shown in email clients.
            Example: ``"Acme IT Support"``
        user_name (str, required): Local part of the sender email address
            (before the ``@``).  Example: ``"noreply"`` → ``[email protected]``
        validation_subdomain (str, optional): Subdomain prefix used for the
            mail CNAME records.  Default: ``"mail"``

    Returns:
        Dict containing the created email domain object (including
        ``dnsValidationRecords`` to configure), or an ``error`` key on
        failure.

    Note:
        Each domain name must be unique in the org — attempting to create a
        domain that already exists returns an ``E0000197`` error.
get_email_domain tool
Retrieve an email domain by its ID.

    Parameters:
        email_domain_id (str, required): Unique ID of the email domain
            (e.g. ``"OeD114iNkrcN6aR680g4"``).
        expand_brands (bool, optional): When ``True``, embeds associated Brand
            objects in ``_embedded.brands``.  Default: ``False``.

    Returns:
        Dict containing the email domain object, or an ``error`` key on
        failure.  Fields include ``id``, ``domain``, ``displayName``,
        ``userName``, ``validationStatus``, ``validationSubdomain``,
        ``dnsValidationRecords``, and (when expanded) ``_embedded.brands``.
replace_email_domain tool
Replace the sender display name and username for an email domain.

    Only ``display_name`` and ``user_name`` can be updated — the domain
    name itself and validation subdomain are immutable after creation.
    The domain's validation status and DNS records are preserved.

    Parameters:
        email_domain_id (str, required): Unique ID of the email domain to
            update.
        display_name (str, required): New sender display name shown in email
            clients.  Example: ``"Acme Security Team"``
        user_name (str, required): New local part of the sender address
            (before the ``@``).  Example: ``"security"``

    Returns:
        Dict containing the updated email domain object, or an ``error`` key
        on failure.
delete_email_domain tool
Delete an email domain by its ID.

    Permanently removes the email domain from the organization.  Any brands
    currently associated with this domain will revert to sending email from
    the default Okta sender address.  A confirmation prompt is shown before
    proceeding.

    Parameters:
        email_domain_id (str, required): Unique ID of the email domain to
            delete.

    Returns:
        Dict with ``success: True`` and a confirmation message on success,
        ``success: False`` if cancelled by the user, or an ``error`` key on
        failure.
verify_email_domain tool
Verify an email domain by checking its DNS records.

    Okta looks up the DNS records that were returned when the domain was
    created and verifies that they are correctly published.  On success the
    domain's ``validationStatus`` transitions to ``VERIFIED`` and Okta begins
    routing email through your custom sender address.

    Prerequisites:
        All four DNS records (one TXT + three CNAMEs) from
        ``dnsValidationRecords`` must be published at your DNS provider before
        calling this tool.  DNS propagation can take up to 48 hours.

    Parameters:
        email_domain_id (str, required): Unique ID of the email domain to
            verify.

    Returns:
        Dict containing the updated email domain object with the new
        ``validationStatus``, or an ``error`` key if verification fails
        (e.g. DNS records not found).

    Common ``validationStatus`` values after this call:
    - ``VERIFIED``    – DNS records were found; domain is active.
    - ``POLLING``     – Okta is still checking; call again shortly.
    - ``ERROR``       – Verification failed; check your DNS configuration.
list_brand_themes tool
List all themes for a brand.

    Currently each Okta org supports only one theme per brand, so this always
    returns a single-element list.

    Parameters:
        brand_id (str, required): The unique identifier of the brand
            (e.g. ``bnd114iNkrcN6aR680g4``).

    Returns:
        Dict containing:
        - themes (List[Dict]): List of theme objects (always one element).
        - total_fetched (int): Number of themes returned.
        - error (str): Present only when the operation fails.
get_brand_theme tool
Retrieve a specific theme by brand ID and theme ID.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme
            (e.g. ``thdul904tTZ6kWVhP0g3``).

    Returns:
        Dict containing the theme object, or an ``error`` key on failure.
        Theme fields include: ``id``, ``logo``, ``favicon``, ``backgroundImage``,
        ``primaryColorHex``, ``primaryColorContrastHex``, ``secondaryColorHex``,
        ``secondaryColorContrastHex``, and all five touchpoint variant values.
replace_brand_theme tool
Replace (fully update) a theme's colours and touchpoint variants.

    All five touchpoint variant fields are required. Optional fields default to
    ``null`` if omitted, which lets Okta auto-optimise contrast colours.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.
        primary_color_hex (str, required): Primary colour hex code (e.g. ``"#1662dd"``).
        secondary_color_hex (str, required): Secondary colour hex code (e.g. ``"#ebebed"``).
        sign_in_page_touch_point_variant (str, required):
            Variant for the sign-in page.
            Valid values: ``BACKGROUND_IMAGE`` | ``BACKGROUND_SECONDARY_COLOR`` | ``OKTA_DEFAULT``.
        end_user_dashboard_touch_point_variant (str, required):
            Variant for the End-User Dashboard.
            Valid values: ``FULL_THEME`` | ``LOGO_ON_FULL_WHITE_BACKGROUND`` | ``OKTA_DEFAULT`` | ``WHITE_LOGO_BACKGROUND``.
        error_page_touch_point_variant (str, required):
            Variant for the error page.
            Valid values: ``BACKGROUND_IMAGE`` | ``BACKGROUND_SECONDARY_COLOR`` | ``OKTA_DEFAULT``.
        email_template_touch_point_variant (str, required):
            Variant for email templates.
            Valid values: ``FULL_THEME`` | ``OKTA_DEFAULT``.
        primary_color_contrast_hex (str, optional): Primary contrast colour hex code.
            When omitted, Okta auto-optimises for accessibility.
        secondary_color_contrast_hex (str, optional): Secondary contrast colour hex code.
        loading_page_touch_point_variant (str, optional):
            Variant for the Okta loading page.
            Valid values: ``NONE`` | ``OKTA_DEFAULT``. Defaults to ``OKTA_DEFAULT``.

    Returns:
        Dict containing the updated theme object, or an ``error`` key on failure.
upload_brand_theme_logo tool
Upload and replace the logo for a theme.

    The file must be in PNG, JPG, or GIF format and less than 100 kB. For
    best results use landscape orientation, a transparent background, and a
    minimum size of 300 × 50 px to prevent upscaling.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.
        file_path (str, required): Absolute path to the image file on the server
            (e.g. ``"/tmp/my-logo.png"``).

    Returns:
        Dict containing:
        - url (str): CDN URL of the uploaded logo.
        - error (str): Present only when the operation fails.
delete_brand_theme_logo tool
Delete the custom logo for a theme.

    After deletion the theme falls back to the default Okta logo. This
    operation is reversible — you can re-upload a logo at any time.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.

    Returns:
        Dict with a ``message`` key on success, or an ``error`` key on failure.
upload_brand_theme_favicon tool
Upload and replace the favicon for a theme.

    The file must be in PNG, JPG, or GIF format and less than 2 MB in size.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.
        file_path (str, required): Absolute path to the image file on the server
            (e.g. ``"/tmp/my-favicon.png"``).

    Returns:
        Dict containing:
        - url (str): CDN URL of the uploaded favicon.
        - error (str): Present only when the operation fails.
delete_brand_theme_favicon tool
Delete the custom favicon for a theme.

    After deletion the theme falls back to the default Okta favicon. This
    operation is reversible — you can re-upload a favicon at any time.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.

    Returns:
        Dict with a ``message`` key on success, or an ``error`` key on failure.
upload_brand_theme_background_image tool
Upload and replace the background image for a theme.

    The file must be in PNG, JPG, or GIF format and less than 2 MB in size.
    The background image is used by touchpoint variants that reference
    ``BACKGROUND_IMAGE``.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.
        file_path (str, required): Absolute path to the image file on the server
            (e.g. ``"/tmp/background.png"``).

    Returns:
        Dict containing:
        - url (str): CDN URL of the uploaded background image.
        - error (str): Present only when the operation fails.
delete_brand_theme_background_image tool
Delete the background image for a theme.

    After deletion the theme no longer has a background image. Touchpoint
    variants that referenced ``BACKGROUND_IMAGE`` will fall back to their
    default appearance. This operation is reversible — you can re-upload a
    background image at any time.

    Parameters:
        brand_id (str, required): The unique identifier of the brand.
        theme_id (str, required): The unique identifier of the theme.

    Returns:
        Dict with a ``message`` key on success, or an ``error`` key on failure.
list_device_assurance_policies tool
List all Device Assurance Policies in the Okta organization.

    Use this to audit which device assurance policies exist, compare OS
    version requirements across policies, find policies that do or do not
    block jailbroken/rooted devices, or identify policies whose platform
    requirements may be outdated.

    *** MANDATORY — OS VERSION THRESHOLD QUERIES ***
        Any time the user's request mentions a version number for filtering or
        comparison (e.g. "older than 14.2", "below 14.2.1", "at least 13.x"):

        1. You MUST pass that exact user-supplied string as ``version_threshold``.
           WRONG: list_device_assurance_policies()                         ← bypasses validation
           RIGHT: list_device_assurance_policies(version_threshold="<user value>") ← always pass through
           NEVER call this tool with no arguments and then filter the result
           yourself — that completely bypasses format validation.

        2. If the version is rejected (e.g. because the patch component is
           missing), relay the error word-for-word. STOP and ask the user:
           "What is the exact full version in X.Y.Z format?" Do NOT guess
           or complete the version yourself. Do NOT proceed until the user
           explicitly confirms the full X.Y.Z version.

        3. NEVER guess or infer what the user "probably" meant — always ask.

    IMPORTANT — always call fresh: Never reuse results from a previous call
    to resolve a policy name to an ID. Always call this tool again to get
    an up-to-date list, as policies may have been created or deleted since
    the last call. The response includes a ``retrieved_at`` timestamp — if
    the user references a policy by name that does not appear in a previous
    list, you MUST call this tool again before concluding that the policy
    does not exist.

    IMPORTANT — intermittent empty response: If this tool returns an empty
    list but the user expects policies to exist, call it again — the API
    occasionally returns an empty response on the first call after server
    start. A retry will return the correct data.

    Returns:
        Dict containing:
            - policies (List[Dict]): List of device assurance policy objects.
              Each policy includes a ``status`` field (``ACTIVE``, ``INACTIVE``,
              or ``UNKNOWN`` if the API did not return it). You MUST present this
              field when listing or comparing policies so the user sees the current
              activation state.
            - version_threshold (str, optional): Echo of the validated threshold
              when one was supplied. Use this value for any subsequent filtering
              or comparison in your response.
            - retrieved_at (str): ISO-8601 UTC timestamp of when this list
              was fetched. Use this to detect stale data.
            - note (str): Reminder that the list may become stale and must
              be re-fetched before resolving a policy name to an ID.
            - warning (str): Present if the API returned an unexpected empty
              response; the caller should retry.
            - error (str): Error message if the operation fails.

    Scope/permission errors:
        If the Okta API returns HTTP 401/403 (commonly due to missing OAuth scopes),
        this tool returns ``{"error": "..."}``.
        In that case, present the error message verbatim and STOP — do not retry
        and do not attempt follow-up actions until scopes are fixed.
get_device_assurance_policy tool
Retrieve a specific Device Assurance Policy by ID.

    Use this to inspect the full configuration of a policy — platform type
    (ANDROID, IOS, MACOS, WINDOWS, CHROMEOS), minimum OS version, disk
    encryption requirements, biometric lock settings, jailbreak/root
    detection, and any other compliance checks configured in the policy.

    IMPORTANT — name-to-ID resolution: This tool requires a policy ID, not a
    name. If the user refers to a policy by name, you MUST call
    list_device_assurance_policies() first to get a FRESH, current list before
    resolving the name to an ID. NEVER resolve a policy name using results
    already present in the conversation — those results may be stale. Even if
    you called list_device_assurance_policies moments ago, call it again: a
    policy may have been created in the Okta UI between that call and now.
    Only after receiving the fresh list may you map the name to an ID and call
    this tool.

    Parameters:
        device_assurance_id (str, required): The ID of the device assurance policy.

    Returns:
        Dict containing the full policy details, or an error dict.

    Scope/permission errors:
        If the Okta API returns HTTP 401/403 (commonly due to missing OAuth scopes),
        this tool returns ``{"error": "..."}``.
        In that case, present the error message verbatim and STOP — do not retry
        and do not attempt follow-up actions until scopes are fixed.
create_device_assurance_policy tool
Create a new Device Assurance Policy.

    *** MANDATORY — OS VERSION ***
        If the policy requires a minimum OS version:
        a. Do NOT put osVersion inside policy_data — the tool constructs it
           from user_stated_os_version after validation.
        b. Set user_stated_os_version to the EXACT characters the user typed,
           verbatim. NEVER invent or complete the version. "12.1" and
           "12.1.0" are NOT the same — never append a patch number yourself.
        c. If user_stated_os_version is rejected, relay the error and ask:
           "What is the exact full version in X.Y.Z format?"

    Platform-specific attribute support:
        - ANDROID: name, platform, osVersion, jailbreak (false only), screenLockType
        - IOS: name, platform, osVersion, jailbreak (false only), screenLockType
        - MACOS: name, platform, osVersion, diskEncryptionType, screenLockType, secureHardwarePresent
        - WINDOWS: name, platform, osVersion, diskEncryptionType, screenLockType, secureHardwarePresent
        - CHROMEOS: name, platform, osVersion

    Parameters:
        policy_data (dict, required): The device assurance policy configuration.
            - name (str, required): The policy name.
            - platform (str, required): Target platform.
                One of: ANDROID, IOS, MACOS, WINDOWS, CHROMEOS.
            - osVersion: Do NOT include — use user_stated_os_version instead.
            - diskEncryptionType (dict, optional): Required disk encryption (MACOS, WINDOWS only).
                Format: {\\"type\\": \\"ALL_INTERNAL_VOLUMES\\"}
            - secureHardwarePresent (bool, optional): Require secure hardware (MACOS, WINDOWS only).
            - screenLockType (dict, optional): Required screen lock type (ANDROID, IOS, MACOS, WINDOWS).
                Format: {\\"include\\": [\\"BIOMETRIC\\"]} or {\\"include\\": [\\"PASSCODE\\", \\"BIOMETRIC\\"]}
                Note: For ANDROID, [\\"PASSCODE\\"] alone is not valid — must include BIOMETRIC.
            - jailbreak (bool, optional): Block jailbroken/rooted devices (IOS, ANDROID only).
                Note: Currently only accepts false value.
        user_stated_os_version (str, optional): The EXACT OS version string the user
            typed, character-for-character. Required when setting a minimum OS version.
            For ANDROID a single major version (e.g. "12") is accepted.
            For all other platforms X.Y.Z is required — X.Y alone will be rejected.

    Returns:
        Dict containing the created policy details, or an error dict.

    Scope/permission errors:
        If the Okta API returns HTTP 401/403 (commonly due to missing OAuth scopes),
        this tool returns ``{"error": "..."}``.
        In that case, present the error message verbatim and STOP — do not retry
        and do not attempt follow-up actions until scopes are fixed.
replace_device_assurance_policy tool
Replace (fully update) an existing Device Assurance Policy.

    *** MANDATORY RESPONSE FORMAT — YOU MUST FOLLOW THIS EVERY TIME ***
        This tool ALWAYS returns ``"before"``, ``"after"``, and ``"changes"``
        fields. After every successful call you MUST:
        1. Present a formatted before/after comparison table to the user.
        2. For every entry in ``"changes"``, show the attribute name,
           old value, new value, and the ``"implication"`` string.
        3. NEVER reply with just "Done" or a one-line summary.
           The user must see the full comparison — always.
        4. OS VERSION — always use ``user_stated_os_version`` parameter:
           a. Do NOT put osVersion in policy_data — the tool derives it from
              user_stated_os_version after validation.
           b. Set user_stated_os_version to the EXACT characters the user
              typed, verbatim. NEVER invent or complete the version. "X.Y" and
              "X.Y.0" are NOT the same — never append a patch number yourself.
           c. If user_stated_os_version is rejected, relay the error — STOP and ask:
              "What is the exact full version in X.Y.Z format?"
           d. Do NOT call this tool until the user explicitly states the full
              X.Y.Z version.

    Use this to update minimum OS version requirements, change platform
    compliance settings, or standardise policy configurations across your
    organisation.

    Platform-specific attribute support:
        - ANDROID: name, platform, osVersion, jailbreak (false only), screenLockType
        - IOS: name, platform, osVersion, jailbreak (false only), screenLockType
        - MACOS: name, platform, osVersion, diskEncryptionType, screenLockType, secureHardwarePresent
        - WINDOWS: name, platform, osVersion, diskEncryptionType, screenLockType, secureHardwarePresent
        - CHROMEOS: name, platform, osVersion

    The response ALWAYS includes ``"before"`` and ``"after"`` state comparisons
    plus a ``"changes"`` list with security implications for each modified attribute.
    You MUST present this as a formatted confirmation summary to the user, showing
    exactly what changed and its security implication. Never simply say "Done" —
    always display the before/after comparison table.

    Parameters:
        device_assurance_id (str, required): The ID of the policy to update.
        policy_data (dict, required): The complete updated policy configuration.
            - name (str, required): The policy name.
            - platform (str, required): Target platform.
                One of: ANDROID, IOS, MACOS, WINDOWS, CHROMEOS.
            - osVersion: Do NOT include — use user_stated_os_version instead.
            - diskEncryptionType (dict, optional): Required disk encryption (MACOS, WINDOWS only).
                Format: {\\"type\\": \\"ALL_INTERNAL_VOLUMES\\"}
            - secureHardwarePresent (bool, optional): Require secure hardware (MACOS, WINDOWS only).
            - screenLockType (dict, optional): Required screen lock type (ANDROID, IOS, MACOS, WINDOWS).
                Format: {\\"include\\": [\\"BIOMETRIC\\"]} or {\\"include\\": [\\"PASSCODE\\", \\"BIOMETRIC\\"]}
                Note: For ANDROID, [\\"PASSCODE\\"] alone is not valid — must include BIOMETRIC.
            - jailbreak (bool, optional): Block jailbroken/rooted devices (IOS, ANDROID only).
                Note: Currently only accepts false value.
        user_stated_os_version (str, optional): The EXACT OS version string the user
            typed, character-for-character. Required when changing the minimum OS version.
            For ANDROID a single major version (e.g. "12") is accepted.
            For all other platforms X.Y.Z is required — X.Y alone will be rejected.

    Returns:
        Dict containing:
            - before (Dict): Policy state before the update (with securityAttributeStatus).
            - after (Dict): Policy state after the update (with securityAttributeStatus).
            - changes (List[Dict]): List of changed attributes, each with
              attribute name, before/after values, and security implication.
            - error (str): Error message if the operation fails.

    Scope/permission errors:
        If the Okta API returns HTTP 401/403 (commonly due to missing OAuth scopes),
        this tool returns ``{"error": "..."}``.
        In that case, present the error message verbatim and STOP — do not retry
        and do not attempt follow-up actions until scopes are fixed.
delete_device_assurance_policy tool
Delete a Device Assurance Policy from the Okta organization.

    The user will be asked for confirmation before the deletion proceeds.
    Note: A policy that is currently assigned to an authentication policy
    cannot be deleted.

    Parameters:
        device_assurance_id (str, required): The ID of the device assurance policy to delete.

    Returns:
        Dict with success status or cancellation message.

    Scope/permission errors:
        If the Okta API returns HTTP 401/403 (commonly due to missing OAuth scopes),
        this tool returns ``{"error": "..."}``.
        In that case, present the error message verbatim and STOP — do not retry
        and do not attempt follow-up actions until scopes are fixed.
list_groups tool
List all the groups from the Okta organization with pagination support.
    If search, filter, or q is specified, it will list only those groups that satisfy the condition.

    Parameters:
        search (str, optional): The value of the search string when searching for some specific set of groups.
        filter (str, optional): A filter string to filter groups by Okta profile attributes.
        q (str, optional): A query string to search groups by Okta profile attributes.
        fetch_all (bool, optional): If True, automatically fetch all pages of results. Default: False.
        after (str, optional): Pagination cursor for fetching results after this point.
        limit (int, optional): Maximum number of groups to return per page (min 20, max 100).
        The search, filter, and q are performed on group profile attributes.

    Examples:
        For pagination:
        - First call: list_groups(search="profile.name sw \\"Engineering\\"")
        - Next page: list_groups(search="profile.name sw \\"Engineering\\"", after="cursor_value")
        - All pages: list_groups(search="profile.name sw \\"Engineering\\"", fetch_all=True)

    Returns:
        Dict containing:
        - items: List of group objects
        - total_fetched: Number of groups returned
        - has_more: Boolean indicating if more results are available
        - next_cursor: Cursor for the next page (if has_more is True)
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
get_group tool
Get a group by ID from the Okta organization

    This tool retrieves a group by its ID from the Okta organization.

    Parameters:
        group_id (str, required): The ID of the group to retrieve.

    Returns:
        List containing the group details.
create_group tool
Create a group in the Okta organization.

    This tool creates a new group in the Okta organization with the provided profile.

    Parameters:
        profile (dict, required): The profile of the group to create.

    Returns:
        List containing the created group details.
delete_group tool
Delete a group by ID from the Okta organization.

    This tool deletes a group by its ID from the Okta organization.
    The user will be asked for confirmation before the deletion proceeds.

    Parameters:
        group_id (str, required): The ID of the group to delete.

    Returns:
        List containing the result of the deletion operation.
confirm_delete_group tool
Confirm and execute group deletion after receiving confirmation.

    .. deprecated::
        This tool exists for backward compatibility with clients that do not
        support MCP elicitation.  New clients should rely on the built-in
        elicitation prompt in ``delete_group`` instead.

    This function MUST ONLY be called after the human user has explicitly typed 'DELETE' as confirmation.
    NEVER call this function automatically after delete_group.

    Parameters:
        group_id (str, required): The ID of the group to delete.
        confirmation (str, required): Must be 'DELETE' to confirm deletion.

    Returns:
        List containing the result of the deletion operation.
update_group tool
Update a group by ID in the Okta organization.

    This tool updates a group by its ID with the provided profile.

    Parameters:
        group_id (str, required): The ID of the group to update.
        profile (dict, required): The new profile for the group.

    Returns:
        List containing the updated group details.
list_group_users tool
List all users in a group by ID from the Okta organization with pagination support.

    This tool retrieves all users in a group by its ID from the Okta organization.

    Parameters:
        group_id (str, required): The ID of the group to retrieve users from.
        fetch_all (bool, optional): If True, automatically fetch all pages of results. Default: False.
        after (str, optional): Pagination cursor for fetching results after this point.
        limit (int, optional): Maximum number of users to return per page (min 20, max 100).

    Examples:
        For pagination:
        - First call: list_group_users("group_id")
        - Next page: list_group_users("group_id", after="cursor_value")
        - All pages: list_group_users("group_id", fetch_all=True)

    Returns:
        Dict containing:
        - items: List of user objects in the group
        - total_fetched: Number of users returned
        - has_more: Boolean indicating if more results are available
        - next_cursor: Cursor for the next page (if has_more is True)
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
list_group_apps tool
List all applications assigned to a group with pagination support.

    Parameters:
        group_id (str, required): The ID of the group to retrieve applications from.
        after (str, optional): Pagination cursor for the next page.
        limit (int, optional): Maximum number of apps to return per page (max 200). Default: 20.
        fetch_all (bool, optional): If True, automatically fetch all pages. Default: False.

    Returns:
        Dict containing:
            - items (List): List of application objects
            - total_fetched (int): Number of apps returned
            - has_more (bool): Whether more results are available
            - next_cursor (str | None): Cursor for the next page
            - fetch_all_used (bool): Whether fetch_all was used
            - pagination_info (Dict): Detailed pagination metadata (when fetch_all=True)
add_user_to_group tool
Add a user to a group by ID in the Okta organization.

    This tool adds a user to a group by its ID in the Okta organization.

    Parameters:
        group_id (str, required): The ID of the group to add the user to.
        user_id (str, required): The ID of the user to add to the group.

    Returns:
        List containing the result of the addition operation.
remove_user_from_group tool
Remove a user from a group by ID in the Okta organization.

    This tool removes a user from a group by its ID in the Okta organization.

    Parameters:
        group_id (str, required): The ID of the group to remove the user from.
        user_id (str, required): The ID of the user to remove from the group.

    Returns:
        List containing the result of the removal operation.
list_policies tool
List all the policies from the Okta organization with pagination support.

    Parameters:
        type (str, required): Specifies the type of policy to return. Available policy types are:
            OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, IDP_DISCOVERY, ACCESS_POLICY,
            PROFILE_ENROLLMENT, POST_AUTH_SESSION, ENTITY_RISK
        status (str, optional): Refines the query by the status of the policy - ACTIVE or INACTIVE.
        q (str, optional): A query string to search policies by name.
        limit (int, optional): Number of results to return per page (min 20, max 100). Default: 20.
        after (str, optional): Pagination cursor for the next page of policies.
        fetch_all (bool, optional): If True, automatically fetch all pages. Default: False.

    Returns:
        Dict containing:
            - items (List[Dict]): List of policy dictionaries
            - total_fetched (int): Number of policies returned
            - has_more (bool): Whether more results are available
            - next_cursor (str | None): Cursor for the next page
            - fetch_all_used (bool): Whether fetch_all was used
            - pagination_info (Dict): Detailed pagination metadata (when fetch_all=True)
            - error (str): Error message if the operation fails
get_policy tool
Retrieve a specific policy by ID.

    Parameters:
        policy_id (str, required): The ID of the policy to retrieve.

    Returns:
        Dict containing the policy details.
create_policy tool
Create a new policy.

    Parameters:
        policy_data (dict, required): The policy configuration containing:
            - type (str, required): Policy type (OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, ACCESS_POLICY, PROFILE_ENROLLMENT,
            POST_AUTH_SESSION, ENTITY_RISK, DEVICE_SIGNAL_COLLECTION)
            - name (str, required): Policy name
            - description (str, optional): Policy description
            - status (str, optional): ACTIVE or INACTIVE (default: ACTIVE)
            - priority (int, optional): Priority of the policy
            - conditions (dict, optional): Policy conditions
            - settings (dict, optional): Policy-specific settings

    Returns:
        Dict containing the created policy details.
update_policy tool
Update an existing policy.

    Parameters:
        policy_id (str, required): The ID of the policy to update.
        policy_data (dict, required): The updated policy configuration.

    Returns:
        Dict containing the updated policy details.
delete_policy tool
Delete a policy.

    The user will be asked for confirmation before the deletion proceeds.

    Parameters:
        policy_id (str, required): The ID of the policy to delete.

    Returns:
        Dict with success status.
activate_policy tool
Activate a policy.

    Parameters:
        policy_id (str, required): The ID of the policy to activate.

    Returns:
        Dict with success status.
deactivate_policy tool
Deactivate a policy.

    The user will be asked for confirmation before the deactivation proceeds.

    Parameters:
        policy_id (str, required): The ID of the policy to deactivate.

    Returns:
        Dict with success status.
list_policy_rules tool
List all rules for a specific policy with pagination support.

    Parameters:
        policy_id (str, required): The ID of the policy.
        after (str, optional): Pagination cursor for the next page of rules.
        fetch_all (bool, optional): If True, automatically fetch all pages. Default: False.

    Returns:
        Dict containing:
            - items (List[Dict]): List of policy rule dictionaries
            - total_fetched (int): Number of rules returned
            - has_more (bool): Whether more results are available
            - next_cursor (str | None): Cursor for the next page
            - fetch_all_used (bool): Whether fetch_all was used
            - pagination_info (Dict): Detailed pagination metadata (when fetch_all=True)
            - error (str): Error message if the operation fails
get_policy_rule tool
Retrieve a specific policy rule.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_id (str, required): The ID of the rule.

    Returns:
        Dict containing the policy rule details.
create_policy_rule tool
Create a new rule for a policy.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_data (dict, required): The rule configuration containing:
            - name (str, required): Rule name
            - priority (int, optional): Priority of the rule
            - status (str, optional): ACTIVE or INACTIVE
            - conditions (dict, optional): Rule conditions
            - actions (dict, optional): Rule actions

    Returns:
        Dict containing the created rule details.
update_policy_rule tool
Update an existing policy rule.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_id (str, required): The ID of the rule to update.
        rule_data (dict, required): The updated rule configuration.

    Returns:
        Dict containing the updated rule details.
delete_policy_rule tool
Delete a policy rule.

    The user will be asked for confirmation before the deletion proceeds.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_id (str, required): The ID of the rule to delete.

    Returns:
        Dict with success status.
activate_policy_rule tool
Activate a policy rule.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_id (str, required): The ID of the rule to activate.

    Returns:
        Dict with success status.
deactivate_policy_rule tool
Deactivate a policy rule.

    Parameters:
        policy_id (str, required): The ID of the policy.
        rule_id (str, required): The ID of the rule to deactivate.

    Returns:
        Dict with success status.
get_login_failures tool
Investigate why a user failed to log in. Returns BOTH authentication failures AND policy-blocked sign-ins in one call.

    USE THIS TOOL (not get_logs) whenever the user asks about:
    - failed logins, login failures, sign-in problems
    - why a user can't log in / couldn't sign in
    - authentication errors, access denied
    - blocked logins, denied access
    - login issues, sign-in issues

    This tool automatically queries BOTH outcome types:
    - FAILURE: wrong password, invalid MFA, locked account, expired credentials
    - DENY: access blocked by sign-on policy (IP restriction, device trust, geo-fencing)

    A single get_logs call only returns ONE of these. This tool returns BOTH.

    Parameters:
        since (str, optional): Start of time window (ISO 8601). Defaults to 24 hours ago.
        until (str, optional): End of time window (ISO 8601). Defaults to now.
        user_id (str, optional): Okta user ID to scope the search. If provided, only
            events for this user are returned. Use list_users to find the user ID first.
        q (str, optional): Free-text search across log fields (e.g. a user's email).

    Returns:
        Dict containing:
        - failures: Events with outcome.result = FAILURE (wrong password, MFA errors, etc.)
            - login_events: Authentication/login-specific failure events
            - other_events: Other FAILURE events (token errors, DNS checks, etc.)
            - total: Total FAILURE event count
            - pagination: Pagination metadata
        - denials: Events with outcome.result = DENY (policy-blocked sign-ins)
            - login_events: Sign-on policy denial events
            - other_events: Other DENY events
            - total: Total DENY event count
            - pagination: Pagination metadata
        - summary: Human-readable summary with counts
        - time_window: The since/until range used
get_logs tool
Retrieve system logs from the Okta organization with pagination support.

    This tool retrieves system logs from the Okta organization.

    IMPORTANT — context isolation:
        Each call is INDEPENDENT. Do NOT carry forward q, search, or filter values from
        a previous query unless the user explicitly asks to apply the same filter again.
        Example: if the user previously asked about user X and now asks "show me ALL failed
        logins", do NOT add q=<user_X_email> to the new call — that would silently scope
        results to user X only.

    IMPORTANT — fetch_all usage:
        By default (fetch_all=False) only the first page is returned (up to 100 entries).
        RULE: For ANY query about "all", "complete", "total", "how many", "list all",
        "show all", "every", or any query that does not explicitly ask for just the
        latest/most recent event, you MUST use fetch_all=True. Without it the result
        is INCOMPLETE and counts will be WRONG.
        ALWAYS pair fetch_all=True with a time window: since="...", until="..."
        Example: get_logs(fetch_all=True, filter='outcome.result eq "FAILURE"', since="2026-03-11T00:00:00.000Z", until="2026-03-12T00:00:00.000Z")
        If the user does not specify a time range, default to the last 24 hours.
        fetch_all is capped at 50 pages (5,000 entries). If stopped_early=True, tell the user
        to narrow their time window or add a more specific filter.

    CRITICAL — login failure investigation:
        FAILURE and DENY are TWO SEPARATE outcome values. A single call is NEVER sufficient.
        - FAILURE: authentication failures (wrong password, locked account, MFA not completed)
        - DENY: access blocked by a sign-on policy rule (IP/device/policy violation)
        You MUST ALWAYS make TWO separate calls when investigating login failures:
          1. get_logs(filter='outcome.result eq "FAILURE"', fetch_all=True, ...)
          2. get_logs(filter='outcome.result eq "DENY"', fetch_all=True, ...)
        Making only ONE call is a BUG — you will silently miss an entire category of failures.
        This applies to ALL prompts about: failed logins, sign-in issues, login problems,
        why a user can't log in, authentication errors, access denied, denied sign-ins,
        denied access, blocked logins, sign-in failures, access issues, etc.

    CRITICAL — MFA challenge queries:
        When the user asks about MFA challenges, MFA prompts, step-up auth, or authentication
        challenges, ALWAYS use filter='outcome.result eq "CHALLENGE"'.
        Do NOT use eventType filters or outcome.result eq "SUCCESS" for MFA challenges.
        Using SUCCESS or eventType is WRONG for challenges — it will return incorrect results.

    CRITICAL — invalid outcome value:
        If the user asks for an unrecognised outcome type (e.g. "INVALID_OUTCOME", "BLOCKED"):
        You MUST still call this tool with filter='outcome.result eq "<VALUE>"' and let the
        server return the error. Do NOT decide yourself that the value is invalid and skip
        the call or say "no events found". The server will return an error dict — you MUST
        read that error dict and relay the message to the user, explaining which values are
        valid. Never silently say "no events found" when the tool returns an error dict.

    Parameters:
        fetch_all (bool, optional): If True, automatically fetch all pages of results. Default: False.
            USE fetch_all=True whenever the user asks for all/complete/total results.
        after (str, optional): Pagination cursor for fetching results after this point.
        limit (int, optional): Maximum number of log entries to return per page (min 20, max 100).
        since (str, optional): Filter logs since this timestamp (ISO 8601 format).
        until (str, optional): Filter logs until this timestamp (ISO 8601 format).
        filter (str, optional): Filter expression for log events.
            Use outcome.result to filter by event outcome. The ONLY valid values are:
            - "SUCCESS"   – successful operations (e.g. logins, password changes)
            - "FAILURE"   – failed operations (e.g. wrong password, locked account)
            - "DENY"      – access blocked by a sign-on policy rule (policy-blocked logins)
            - "ALLOW"     – access explicitly allowed by a sign-on policy rule
            - "CHALLENGE" – MFA or step-up challenge triggered.
                            ALWAYS use filter='outcome.result eq "CHALLENGE"' for MFA challenges.
                            Do NOT use eventType filters or user.authentication fields for this.
                            Using outcome.result eq "SUCCESS" or eventType is WRONG for challenges.
            - "UNKNOWN"   – outcome could not be determined
            Any other value (e.g. "INVALID_OUTCOME", "BLOCKED", "DENIED") is NOT valid and
            will return an error. If the user asks for an unrecognised outcome type, you MUST
            still call this tool with filter='outcome.result eq "<VALUE>"' and let the server
            return the error. Do NOT decide yourself that the value is invalid and skip the call.
        q (str, optional): Query string to search log events.

    Examples:
        For pagination:
        - First call: get_logs()
        - Next page: get_logs(after="cursor_value")
        - All pages: get_logs(fetch_all=True)
        - Time range: get_logs(since="2024-01-01T00:00:00.000Z", until="2024-01-02T00:00:00.000Z")
        - Policy-blocked logins: get_logs(filter='outcome.result eq "DENY"', fetch_all=True)
        - Authentication failures: get_logs(filter='outcome.result eq "FAILURE"', fetch_all=True)
        - MFA challenges: get_logs(filter='outcome.result eq "CHALLENGE"', fetch_all=True)
        - Complete login failure investigation (ALWAYS do both):
            get_logs(filter='outcome.result eq "FAILURE"', since=..., until=..., fetch_all=True)
            get_logs(filter='outcome.result eq "DENY"', since=..., until=..., fetch_all=True)

    Returns:
        Dict containing:
        - items: List of log entry objects
        - total_fetched: Number of log entries returned
        - has_more: Boolean indicating if more results are available
        - next_cursor: Cursor for the next page (if has_more is True)
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
            NOTE: fetch_all is capped at 50 pages (5,000 entries). If stopped_early=True,
            advise the user to narrow their time window or use a more specific filter.
        - error: If present, relay this error message directly to the user. Do NOT treat
            an error response as "no results found" — always read and report the error text.
list_user_groups tool
List all groups that a user is a member of.

    This tool retrieves all groups of which the specified user is a member.
    To list all groups in your org, use list_groups() from the Groups tools instead.

    Note: the underlying Okta API returns the user's full group membership in a
    single response and does not support pagination for this endpoint.

    Parameters:
        user_id (str, required): The ID, login, or login shortname of the user.

    Returns:
        List of group objects the user belongs to.
list_users tool
List all the users from the Okta organization with pagination support.
    If search, filter, or q is specified, it will list only those users that satisfy the condition.
    Use after and limit for pagination.
    Use fetch_all=True to automatically fetch all pages of results.
    By default, it will only fetch users whose status is not "DEPROVISIONED".

    IMPORTANT — default page size:
        When limit is NOT provided, the server defaults to 20 users per page.
        ALWAYS omit the limit parameter unless the user explicitly requests a
        different page size.

    Parameters:
        search (str, optional): The value of the search string when searching for some specific set of users.
        filter (str, optional): A filter string to filter users by Okta profile attributes.
        q (str, optional): A query string to search users by Okta profile attributes.
        fetch_all (bool, optional): If True, automatically fetch all pages of results. Default: False.
            NOTE: fetch_all is capped at 10 pages (2,000 users) to keep responses manageable.
            If the org has more users than the cap, the result will be partial. Always check
            pagination_info.stopped_early in the response — if True, the count is incomplete
            and you MUST tell the user "at least N users were found; the result may be incomplete.
            Use export_users_csv() for a complete export."
            NEVER say the org has been "fully enumerated" or report the count as the exact total
            when stopped_early is True.
            WARNING: For orgs with more than 2,000 users, use export_users_csv() instead —
            it writes directly to disk and handles any org size without response size limits.
        after (str, optional): Pagination cursor for fetching results after this point.
        limit (int, optional): Maximum number of users to return per page (min 20, max 200).
            Default: 20.
        The search, filter, and q are performed on user profile attributes.

    Examples:
        To search users whose organization is Okta use search=profile.organization eq "Okta"
        To search users updated after 06/01/2013 but with a status of LOCKED_OUT or RECOVERY use
        search=lastUpdated gt "2013-06-01T00:00:00.000Z" and (status eq "LOCKED_OUT" or status eq "RECOVERY")

        For pagination:
        - First call: list_users(search="profile.department eq \\"Engineering\\"")
        - Next page: list_users(search="profile.department eq \\"Engineering\\"", after="cursor_value")
        - All pages: list_users(search="profile.department eq \\"Engineering\\"", fetch_all=True)

    Returns:
        Dict containing:
        - items: List of (user.profile, user.id) tuples
        - total_fetched: Number of users returned
        - has_more: Boolean indicating if more results are available
        - next_cursor: Cursor for the next page (if has_more is True)
        - fetch_all_used: Boolean indicating if fetch_all was used
        - pagination_info: Additional pagination metadata (when fetch_all=True)
get_user_profile_attributes tool
List all user profile attributes supported by your Okta org.
    This is helpful in case you need to check if the user profile attribute is valid.
    The prompt can contain non existent search terms, in which case we should seek clarification from the user
    by listing most similar profile attributes.

    Returns:
        A list of user profile attributes.
get_user tool
Get a user by ID from the Okta organization

    This tool retrieves a user by their ID from the Okta organization.

    Parameters:
        user_id (str, required): The ID of the user to retrieve.

    Returns:
        List containing the user details.
create_user tool
Create a user in the Okta organization.

    This tool creates a new user in the Okta organization with the provided profile.

    Parameters:
        profile (dict, required): The profile of the user to create.
        activate (bool, optional): Whether to activate the user immediately after creation.
            Set to False to create the user in STAGED status (no activation email sent).
            Default: True.

    Examples:
        # Create user with immediate activation (default)
        result = await create_user(profile=user_profile)

        # Create user in STAGED status (no activation email)
        result = await create_user(profile=user_profile, activate=False)

    Returns:
        List containing the created user details.
update_user tool
Update a user in the Okta organization.

    This tool updates an existing user in the Okta organization with the provided profile.

    Parameters:
        user_id (str, required): The ID of the user to update.
        profile (dict, required): The updated profile of the user.

    Returns:
        List containing the updated user details.
deactivate_user tool
Deactivates a user from the Okta organization.

    This tool deactivates a user from the Okta organization by their ID.
    The user will be asked for confirmation before the deactivation proceeds.
    Deactivating the user is a prerequisite for deleting the user.

    Parameters:
        user_id (str, required): The ID of the user to deactivate.

    Returns:
        List containing the result of the deactivation operation.
delete_deactivated_user tool
Delete a user from the Okta organization who has already been deactivated or deprovisioned.

    This tool permanently deletes a deactivated/deprovisioned user. The user will be
    asked for confirmation before the deletion proceeds.

    Parameters:
        user_id (str, required): The ID of the deactivated or deprovisioned user to delete.

    Returns:
        List containing the result of the deletion operation.
export_users_csv tool
Fetch all users from the Okta organization and save them to a CSV file on disk.

    Uses the same pagination logic as list_users (fetch_all=True) but writes results
    directly to a CSV file instead of returning them, avoiding response size limits.

    Parameters:
        output_path (str): Absolute path where the CSV file will be written.
            Defaults to /tmp/okta_users_export.csv.
        search (str, optional): Search expression for filtering users.
        filter (str, optional): Filter string for users.
        q (str, optional): Query string for users.

    Returns:
        Dict containing:
        - output_path: Path to the written CSV file
        - total_users: Total number of users written
        - pages_fetched: Number of pages fetched
        - stopped_early: Whether pagination hit the page cap
        - stop_reason: Reason pagination stopped (if stopped_early)
stub_fn tool

What we checked

The same checks run on every server. Each line below has one of these marks:

FoundA published issue such as a risky tool or a CVE
PassedWe ran the check on this server and found nothing
After reviewChecked; we publish it once a person verifies it
Partly tracedRan, but the scanner could not follow every path to its end
FactWhat the code does, not a judgement either way
Not checkedThe scanner had nothing to read for it, or it needs the live server
Code Safetypartly traced
  • 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injection
    Checked on every scan. Results in this category are published only after a person has verified them.
Capability Exposure5.7
  • Runs programs the caller chooses
    No tool runs a command or program the caller supplies — 113 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Executes caller-supplied code
    No tool evaluates code the caller supplies — 113 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Reads or writes any file path HIGH
    2 findings in export_users_csv
  • Requests any address
    No tool sends a request to an address the caller supplies — 113 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Runs caller-supplied SQL
    No tool executes a query the caller supplies — 113 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Tools that start processes
    Not seen in the traced code of 114 capabilities; 113 more call code the scanner could not follow, where it may happen
  • Tools that touch files
    5 of 114 capabilities touch files; 108 more call code the scanner could not follow, where it may happen
  • Tools that call the network
    1 of 114 capabilities call the network; 112 more call code the scanner could not follow, where it may happen
Where the code is: 114 handlers in 16 files at commit 06516a1ba9e7
Prompt Integrity10.0
  • 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrity
    Checked on every scan. Results in this category are published only after a person has verified them.
Supply Chain7.0
  • Dependency manifests
    1 manifest: pyproject.toml
  • Lockfiles checked against OSV
    1 file resolved and checked against the OSV database; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
  • Known vulnerabilities in production dependencies
    No production dependency with a known advisory
  • Known vulnerabilities in other dependencies
    No package used only for development, tests or examples has a known advisory
  • MCP SDK version
    No MCP SDK declared in a manifest
Secrets & Credentials10.0
  • 3 checks: credential harvesting, undeclared credential access, credentials sent over the network
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tools that read credentials
    4 of 114 capabilities read credentials; 109 more call code the scanner could not follow, where it may happen
  • Authentication declared
    Not checked: needs the live server's tools/list (a remote server declares how clients authenticate)
Behavior Transparency10.0
  • 3 checks: undeclared network access, undeclared file access, undeclared process execution
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tool descriptions present
    Every tool has a description the model and the user can read
  • Statically known names
    Every tool's name could be read from the code
  • Input schemas
    Not checked: needs the live server's tools/list (every tool declares an input schema)
  • Destructive tools annotated
    Not checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)

Dependencies with known vulnerabilities (0 in production)

Dependency ranges were not resolved against a lockfile, so the score is capped at 7.

No known vulnerabilities in the production dependencies that could be checked.

Past security advisories

Vulnerabilities published for this server itself, from the GitHub Advisory Database.

No security advisories have been published for this server in the GitHub Advisory Database.

How it runs

Where it runsOn your machine, started by your MCP client from this repository or its package
Transportstdio
Sign-innot checked needs the live server
Servers in the code1 (Okta IDaaS MCP Server)

The project's own security

Security policyyes SECURITY.md
Private reportingmentioned the policy names a private channel
Past advisoriesnone in the GitHub Advisory Database
Last push2026-11-02
Signed releasesnot checked yet

Where it is published

Listed in5 catalogs (awesome_habitoai, docker_catalog, github_search, glama, mcp_toplist)
LicenseApache-2.0
Created2025-09-23

Attack map

How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.

Request a scan or an audit

Tell us about your server. We reply within 5 working days.

What do you need? *

We use these details only to answer you.