> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-docs-event-stream-action-templates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit SSO Providers on Web

> Tabbed interface for editing SSO providers: SSO settings, provisioning (SCIM), and domain management

export const ReleaseStageNotice = ({feature, stage, plans, contact, terms}) => {
  const stageTextMap = {
    "beta": "Beta",
    "ea": "Early Access"
  };
  const stageText = stageTextMap[stage] || "a product release stage";
  const prsLink = "/docs/troubleshoot/product-lifecycle/product-release-stages";
  const linkify = (text, url) => {
    return <a href={url} target="_blank" rel="noreferrer" class="link">{text}</a>;
  };
  const includeDetails = (plans, contact, terms) => {
    const hasDetails = terms || plans || contact;
    if (!hasDetails) return null;
    return <span data-as="p">
            {plans && <>This feature is available for {linkify(`${plans} plans`, "https://auth0.com/pricing")}. </>}
            {contact && "To participate, contact " + contact + ". "}
            {terms && <>By using this feature, you agree to the applicable Free Trial terms in Okta's {linkify("Master Subscription Agreement", "https://www.okta.com/legal")}.</>}
        </span>;
  };
  return <Warning>
            <span data-as="p">
                <strong>The {feature} feature is in {linkify(stageText, prsLink)}.</strong>
            </span>

            {includeDetails(plans, contact, terms)}
        </Warning>;
};

export const ComponentLoader = props => {
  const themePref = window?.localStorage?.getItem?.("isDarkMode");
  const theme = themePref === "dark" || themePref === "light" ? themePref : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
  const lang = {
    i18n: {
      currentLanguage: props.lang || "en-US"
    }
  };
  return <div style={{
    minHeight: "400px",
    marginTop: "40px",
    background: theme === "light" ? "rgb(var(--gray-950)/.03)" : "rgb(255 255 255/.1)",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    position: "relative",
    backgroundSize: "16px 16px",
    borderRadius: "10px",
    boxShadow: "0 1px 4px 0 rgba(16,30,54,0.04)",
    display: "flex",
    flexDirection: "column"
  }}>
      <div style={{
    minWidth: "320px",
    width: "96.5%",
    maxWidth: "1200px",
    margin: "12px 12px 0",
    background: theme === "light" ? "#ffffff" : "#101011",
    borderRadius: "10px",
    boxShadow: "0 2px 8px 0 rgba(16,30,54,0.04)",
    padding: "24px",
    minHeight: "400px"
  }} data-uc-component={props.componentSelector} data-uc-props={JSON.stringify(lang)}>
        <Spinner size={40} color="#8A94A6" style={{
    position: "absolute",
    top: "50%",
    left: "50%",
    transform: "translate(-50%, -50%)",
    zIndex: 1
  }} />
      </div>
      <div style={{
    width: "100%",
    textAlign: "center",
    color: theme === "light" ? "#6B7280" : "ffffff",
    fontSize: "12px",
    marginTop: "8px",
    marginBottom: "8px",
    letterSpacing: "0.01em",
    fontWeight: 400
  }}>
        {props.componentPreviewText}
      </div>
    </div>;
};

export const Spinner = ({size = 40, color = "#8A94A6", style = {}}) => <div style={{
  display: "flex",
  alignItems: "center",
  justifyContent: "center",
  ...style
}} aria-label="Loading" role="status">
    <svg width={size} height={size} viewBox="0 0 50 50" style={{
  display: "block"
}}>
      <circle cx="25" cy="25" r="20" fill="none" stroke={color} strokeWidth="5" strokeDasharray="90 150" strokeLinecap="round">
        <animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite" />
      </circle>
    </svg>
  </div>;

<ReleaseStageNotice feature="Auth0 Universal Components" stage="ea" terms="true" contact="Auth0 Support" />

The `SsoProviderEdit` component provides a unified interface to edit [Single Sign-On](/docs/authenticate/enterprise-connections/self-service-enterprise-configuration) providers.

<ComponentLoader componentSelector="sso-provider-edit" componentPreviewText="Preview of the SSO Provider Edit component" />

<Tabs>
  <Tab title="React">
    ## Setup requirements

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      **Auth0 Configuration Required**—Ensure your tenant is configured with the
      My Organization API. [View setup guide
      →](/docs/get-started/universal-components/web/components/build-delegated-admin#enable-the-my-organization-api)
    </Callout>

    ## Installation

    <CodeGroup>
      ```bash pnpm wrap lines theme={null}
      pnpm add @auth0/universal-components-react
      ```

      ```bash npm wrap lines theme={null}
      npm install @auth0/universal-components-react
      ```
    </CodeGroup>

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      Running either command also installs the @auth0/universal-components-core
      dependency for shared utilities and Auth0 integration.
    </Callout>

    ## Get started

    ```tsx wrap lines theme={null}
    import { SsoProviderEdit } from "@auth0/universal-components-react";
    import { useNavigate, useParams } from "react-router-dom";

    export function EditProviderPage() {
      const { providerId } = useParams();
      const navigate = useNavigate();

      return (
        <SsoProviderEdit
          providerId={providerId}
          backButton={{
            onClick: () => navigate("/providers"),
          }}
          sso={{
            updateAction: {
              onAfter: () => console.log("Provider updated"),
            },
          }}
        />
      );
    }
    ```

    <Accordion title="Full integration example">
      ```tsx wrap lines theme={null}
      import React from "react";
      import { SsoProviderEdit } from "@auth0/universal-components-react";
      import { Auth0Provider } from "@auth0/auth0-react";
      import { Auth0ComponentProvider } from "@auth0/universal-components-react/spa";
      import { useNavigate, useParams } from "react-router-dom";
      import { analytics } from "./lib/analytics";

      function EditProviderPage() {
        const { providerId } = useParams();
        const navigate = useNavigate();

        return (
          <div className="max-w-4xl mx-auto p-6">
            <SsoProviderEdit
              providerId={providerId}
              backButton={{
                onClick: () => navigate("/providers"),
              }}
              sso={{
                updateAction: {
                  onAfter: (provider) => {
                    analytics.track("Provider Updated", { name: provider.name });
                    toast.success("Provider configuration saved");
                  },
                },
                deleteAction: {
                  onBefore: (provider) => {
                    return confirm(
                      `Delete "${provider.display_name}"? This cannot be undone.`,
                    );
                  },
                  onAfter: () => {
                    toast.success("Provider deleted");
                    navigate("/providers");
                  },
                },
              }}
              provisioning={{
                createAction: {
                  onAfter: () => toast.success("SCIM provisioning enabled"),
                },
                createScimTokenAction: {
                  onAfter: () =>
                    toast.info("Copy your SCIM token - it won't be shown again"),
                },
              }}
              domains={{
                verifyAction: {
                  onAfter: (domain) => {
                    toast.success(`${domain.domain} verified`);
                  },
                },
                deleteAction: {
                  onBefore: (domain) => confirm(`Delete ${domain.domain}?`),
                },
              }}
              customMessages={{
                tabs: {
                  sso: "Configuration",
                  provisioning: "User Sync (SCIM)",
                  domains: "Linked Domains",
                },
              }}
              styling={{
                variables: {
                  common: { "--color-primary": "#059669" },
                },
              }}
            />
          </div>
        );
      }

      export default function App() {
        const domain = "your-domain.auth0.com";

        return (
          <Auth0Provider
            domain={domain}
            clientId="your-client-id"
            authorizationParams={{
              redirect_uri: window.location.origin,
            }}
            interactiveErrorHandler="popup" // Required to handle step-up auth challenges via Universal Login popup
          >
            <Auth0ComponentProvider domain={domain}>
              <EditProviderPage />
            </Auth0ComponentProvider>
          </Auth0Provider>
        );
      }

      ```
    </Accordion>

    ## Props

    ### Required props

    Required props are fundamental to the component's operation. `SsoProviderEdit` requires the provider ID to load and edit the correct provider.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>providerId</code>
          </td>

          <td>
            <code>string</code>
          </td>

          <td>
            <strong>Required.</strong> The SSO provider ID to edit.
          </td>
        </tr>
      </tbody>
    </table>

    ***

    ### Display props

    Display props control how the component renders without affecting its behavior.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>hideHeader</code>
          </td>

          <td>
            <code>boolean</code>
          </td>

          <td>
            Hide the header section. Default: <code>false</code>
          </td>
        </tr>
      </tbody>
    </table>

    ***

    ### Action props

    User interactions across the three tabs are handled by several action props that are organized under the respective tab's name (`sso`, `provisioning`, and `domains`).

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>backButton</code>
          </td>

          <td>
            <code>Object</code>
          </td>

          <td>
            Back button configuration.
          </td>
        </tr>

        <tr>
          <td>
            <code>sso</code>
          </td>

          <td>
            <code>SsoProviderTabEditProps</code>
          </td>

          <td>
            SSO tab actions. <a href="#sso-tab-actions">Details</a>
          </td>
        </tr>

        <tr>
          <td>
            <code>provisioning</code>
          </td>

          <td>
            <code>SsoProvisioningTabEditProps</code>
          </td>

          <td>
            Provisioning tab actions.
            <a href="#provisioning-tab-actions">Details</a>
          </td>
        </tr>

        <tr>
          <td>
            <code>domains</code>
          </td>

          <td>
            <code>SsoDomainsTabEditProps</code>
          </td>

          <td>
            Domains tab actions. <a href="#domains-tab-actions">Details</a>
          </td>
        </tr>
      </tbody>
    </table>

    **backButton**

    **Type:** `{ icon?: LucideIcon; onClick: (e: MouseEvent) => void }`

    Configures the back button in the component header. Use this to navigate back to your providers list.

    **Properties:**

    * `icon`—Custom Lucide icon component (optional, defaults to ArrowLeft)
    * `onClick`—Click handler for navigation

    **Example:**

    ```tsx wrap lines theme={null}
    import { ChevronLeft } from "lucide-react";

    <SsoProviderEdit
      providerId={providerId}
      backButton={{
        icon: ChevronLeft,
        onClick: () => navigate("/providers"),
      }}
    />;
    ```

    ***

    ### SSO tab actions

    The `sso` prop configures actions for the SSO settings tab. This tab manages the provider's authentication configuration.

    <table class="table">
      <thead>
        <tr>
          <th>Action</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>updateAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider, IdentityProvider></code>
          </td>

          <td>
            Update provider settings.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Delete provider permanently.
          </td>
        </tr>

        <tr>
          <td>
            <code>removeFromOrganizationAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Remove from organization.
          </td>
        </tr>
      </tbody>
    </table>

    **sso.updateAction**

    **Type:** `ComponentAction<IdentityProvider, IdentityProvider>`

    Controls saving changes to provider configuration (client ID, secrets, certificates, etc.).

    **Properties:**

    * `disabled`—Disable the save button
    * `onBefore(provider)`—Runs before the update. Return `false` to prevent saving (for example, to show a confirmation dialog).
    * `onAfter(provider, result)`—Runs after the provider is successfully updated. Use this to show a notification or track the event.

    **Example:**

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      sso={{
        updateAction: {
          onBefore: (provider) => {
            return confirm("Save changes to provider configuration?");
          },
          onAfter: (provider) => {
            toast.success("Provider configuration saved");
            analytics.track("Provider Updated", { name: provider.name });
          },
        },
      }}
    />
    ```

    ***

    **sso.deleteAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Controls permanent deletion of the provider from your Auth0 tenant.

    **Example:**

    ```tsx wrap lines theme={null}
    sso={{
      deleteAction: {
        onBefore: (provider) => {
          return confirm(`Permanently delete "${provider.display_name}"? This cannot be undone.`);
        },
        onAfter: () => navigate("/providers"),
      },
    }}
    ```

    ***

    **sso.removeFromOrganizationAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Controls removing the provider from the organization without deleting it. The provider remains available to be re-added later.

    **Example:**

    ```tsx wrap lines theme={null}
    sso={{
      removeFromOrganizationAction: {
        onBefore: (provider) => {
          return confirm(`Remove "${provider.display_name}" from this organization?`);
        },
        onAfter: () => navigate("/providers"),
      },
    }}
    ```

    ***

    ### Provisioning tab actions

    The `provisioning` prop configures actions for the SCIM provisioning tab. This tab manages automated user provisioning via the SCIM protocol.

    <table class="table">
      <thead>
        <tr>
          <th>Action</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>createAction</code>
          </td>

          <td>
            <code>
              ComponentAction\<IdentityProvider,
              CreateIdPProvisioningConfigResponseContent>
            </code>
          </td>

          <td>
            Enable SCIM provisioning.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Disable SCIM provisioning.
          </td>
        </tr>

        <tr>
          <td>
            <code>createScimTokenAction</code>
          </td>

          <td>
            <code>
              ComponentAction\<IdentityProvider,
              CreateIdpProvisioningScimTokenResponseContent>
            </code>
          </td>

          <td>
            Generate SCIM token.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteScimTokenAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Revoke SCIM token.
          </td>
        </tr>
      </tbody>
    </table>

    **provisioning.createAction**

    **Type:** `ComponentAction<IdentityProvider, CreateIdPProvisioningConfigResponseContent>`

    Enables SCIM provisioning for the provider. Once enabled, you can generate a SCIM token for your identity provider to use.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      createAction: {
        onBefore: (provider) => {
          return confirm("Enable SCIM provisioning for this provider?");
        },
        onAfter: (provider, config) => {
          toast.success("SCIM provisioning enabled");
          console.log("SCIM endpoint:", config.scim_endpoint);
        },
      },
    }}
    ```

    ***

    **provisioning.deleteAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Disables SCIM provisioning and removes all provisioning configuration for that identity provider.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      deleteAction: {
        onBefore: (provider) => {
          return confirm("Disable SCIM provisioning? This will stop automatic user sync.");
        },
        onAfter: () => toast.success("SCIM provisioning disabled"),
      },
    }}
    ```

    ***

    **provisioning.createScimTokenAction**

    **Type:** `ComponentAction<IdentityProvider, CreateIdpProvisioningScimTokenResponseContent>`

    Generates a new SCIM bearer token for your identity provider to authenticate with Auth0.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      createScimTokenAction: {
        onAfter: (provider, tokenResponse) => {
          // Token is shown once - user should copy it immediately
          console.log("New SCIM token generated");
        },
      },
    }}
    ```

    ***

    **provisioning.deleteScimTokenAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Revokes the SCIM token. The identity provider will no longer be able to sync users until a new token is generated.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      deleteScimTokenAction: {
        onBefore: () => {
          return confirm("Revoke SCIM token? Your identity provider will lose access immediately.");
        },
      },
    }}
    ```

    ***

    ### Domains tab actions

    The `domains` prop configures actions for the domains tab. This tab manages domains associated with the provider for automatic user routing.

    <table class="table">
      <thead>
        <tr>
          <th>Action</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>createAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain></code>
          </td>

          <td>
            Add a domain.
          </td>
        </tr>

        <tr>
          <td>
            <code>verifyAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain></code>
          </td>

          <td>
            Verify domain ownership.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain></code>
          </td>

          <td>
            Delete a domain.
          </td>
        </tr>

        <tr>
          <td>
            <code>associateToProviderAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain, IdentityProvider | null></code>
          </td>

          <td>
            Associate domain to provider.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteFromProviderAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain, IdentityProvider | null></code>
          </td>

          <td>
            Remove domain from provider.
          </td>
        </tr>
      </tbody>
    </table>

    **domains.createAction**

    **Type:** `ComponentAction<Domain>`

    Controls adding new domains to the organization from within the provider edit interface.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      createAction: {
        onAfter: (domain) => {
          toast.success(`Domain ${domain.domain} added`);
        },
      },
    }}
    ```

    ***

    **domains.verifyAction**

    **Type:** `ComponentAction<Domain>`

    Controls domain verification via DNS TXT record.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      verifyAction: {
        onBefore: (domain) => {
          return confirm(`Verify ${domain.domain}? Ensure your DNS record is configured.`);
        },
        onAfter: (domain) => {
          toast.success(`${domain.domain} verified successfully`);
        },
      },
    }}
    ```

    ***

    **domains.deleteAction**

    **Type:** `ComponentAction<Domain>`

    Controls domain deletion.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      deleteAction: {
        onBefore: (domain) => {
          return confirm(`Delete ${domain.domain}?`);
        },
      },
    }}
    ```

    ***

    **domains.associateToProviderAction**

    **Type:** `ComponentAction<Domain, IdentityProvider | null>`

    Associates a verified domain with this SSO provider for automatic user routing.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      associateToProviderAction: {
        onAfter: (domain, provider) => {
          console.log(`${domain.domain} now routes to ${provider?.name}`);
        },
      },
    }}
    ```

    ***

    **domains.deleteFromProviderAction**

    **Type:** `ComponentAction<Domain, IdentityProvider | null>`

    Removes a domain's association with this provider.

    ***

    ### Customization props

    Customization props let you adapt the component to your brand, locale, and validation requirements without modifying source code.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>schema</code>
          </td>

          <td>
            <code>SsoProviderEditSchema</code>
          </td>

          <td>
            Field validation rules.
          </td>
        </tr>

        <tr>
          <td>
            <code>customMessages</code>
          </td>

          <td>
            <code>Partial\<SsoProviderEditMessages></code>
          </td>

          <td>
            i18n text overrides.
          </td>
        </tr>

        <tr>
          <td>
            <code>styling</code>
          </td>

          <td>
            <code>ComponentStyling\<SsoProviderEditClasses></code>
          </td>

          <td>
            CSS variables and class overrides.
          </td>
        </tr>
      </tbody>
    </table>

    **schema**

    Set custom validation rules for provider and domain fields.

    <Accordion title="Available Schema Fields">
      All schema fields support: `regex`, `errorMessage`, `minLength`, `maxLength`, `required`

      **provider.\***—Provider configuration fields by strategy

      * Common: `name`, `displayName`
      * Strategy-specific fields (same as SsoProviderCreate)

      **domains.create.domainUrl**—Domain URL validation
    </Accordion>

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      schema={{
        provider: {
          displayName: {
            required: true,
            maxLength: 100,
          },
        },
        domains: {
          create: {
            domainUrl: {
              regex: /^[a-z0-9.-]+\.[a-z]{2,}$/,
              errorMessage: "Enter a valid domain (example.com)",
            },
          },
        },
      }}
    />
    ```

    ***

    **customMessages**

    Customize all text and translations. All fields are optional and use defaults if not provided.

    <Accordion title="Available Messages">
      **header**—Component header

      * `title`, `back_button_text`

      **tabs**—Tab labels

      * `sso`, `provisioning`, `domains`

      **sso\_tab**—SSO settings tab

      * `title`, `description`
      * `fields.*`—Form field labels by strategy
      * `actions.save_button_text`, `actions.delete_button_text`
      * `delete_modal.*`, `remove_modal.*`

      **provisioning\_tab**—Provisioning tab

      * `title`, `description`
      * `scim_endpoint.label`, `scim_token.label`
      * `actions.enable_button_text`, `actions.disable_button_text`
      * `actions.generate_token_button_text`, `actions.revoke_token_button_text`

      **domains\_tab**—Domains tab

      * `title`, `description`
      * Same structure as DomainTable messages

      **notifications**—API responses

      * `provider_update_success`, `provider_delete_success`
      * `provisioning_enable_success`, `provisioning_disable_success`
      * `scim_token_create_success`, `scim_token_delete_success`
      * Domain-related notifications
    </Accordion>

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      customMessages={{
        header: {
          title: "Edit Provider",
        },
        tabs: {
          sso: "Settings",
          provisioning: "User Sync",
          domains: "Domains",
        },
        sso_tab: {
          actions: {
            save_button_text: "Save Changes",
          },
        },
        notifications: {
          provider_update_success: "Provider saved successfully!",
        },
      }}
    />
    ```

    ***

    **styling**

    Customize appearance with CSS variables and class overrides. Supports theme-aware styling.

    <Accordion title="Available Styling Options">
      **Variables**—CSS custom properties

      * `common`—Applied to all themes
      * `light`—Light theme only
      * `dark`—Dark theme only

      **Classes**—Component class overrides

      * `SsoProviderEdit-header`
      * `SsoProviderEdit-tabs`
      * `SsoProviderEdit-ssoTab`
      * `SsoProviderEdit-provisioningTab`
      * `SsoProviderEdit-domainsTab`
    </Accordion>

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      styling={{
        variables: {
          common: {
            "--font-size-title": "1.5rem",
          },
          light: {
            "--color-primary": "#059669",
          },
        },
        classes: {
          "SsoProviderEdit-tabs": "border-b border-gray-200",
        },
      }}
    />
    ```

    ***

    ## Advanced customization

    The `SsoProviderEdit` component is composed of smaller subcomponents and hooks. You can import them individually to build custom provider editing workflows if you use shadcn.

    ### Available subcomponents

    For advanced use cases, you can import individual subcomponents to embed specific tabs or sections in different contexts.

    <table class="table">
      <thead>
        <tr>
          <th>Component</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>SsoProviderSsoTab</code>
          </td>

          <td>SSO configuration form</td>
        </tr>

        <tr>
          <td>
            <code>SsoProviderProvisioningTab</code>
          </td>

          <td>SCIM provisioning management</td>
        </tr>

        <tr>
          <td>
            <code>SsoProviderDomainsTab</code>
          </td>

          <td>Domain association management</td>
        </tr>

        <tr>
          <td>
            <code>ProviderConfigureFields</code>
          </td>

          <td>Dynamic form fields by strategy</td>
        </tr>

        <tr>
          <td>
            <code>ScimTokenDisplay</code>
          </td>

          <td>SCIM token display with copy functionality</td>
        </tr>
      </tbody>
    </table>

    ### Available hooks

    These hooks provide the underlying logic without any UI. Use them to build completely custom interfaces while leveraging the Auth0 API integration.

    <table class="table">
      <thead>
        <tr>
          <th>Hook</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>useSsoProviderEdit</code>
          </td>

          <td>Provider loading and update logic</td>
        </tr>

        <tr>
          <td>
            <code>useSsoProviderProvisioning</code>
          </td>

          <td>SCIM provisioning management</td>
        </tr>

        <tr>
          <td>
            <code>useSsoProviderDomains</code>
          </td>

          <td>Domain association management</td>
        </tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="Next.js">
    ## Setup requirements

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      **Auth0 Configuration Required**—Ensure your tenant is configured with the
      My Organization API. [View setup guide
      →](/docs/get-started/universal-components/web/components/build-delegated-admin#configure-auth0-dashboard)
    </Callout>

    ## Installation

    <CodeGroup>
      ```bash npm (Recommended) wrap lines theme={null}
      npm install @auth0/universal-components-react
      ```

      ```bash pnpm wrap lines theme={null}
      pnpm add @auth0/universal-components-react
      ```
    </CodeGroup>

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      Running the npm or pnpm commands installs the @auth0/universal-components-core
      dependency for shared utilities and Auth0 integration.
    </Callout>

    ## Get started

    ```tsx page.tsx wrap lines theme={null}
    import { SsoProviderEdit } from "@auth0/universal-components-react";
    import { useRouter } from "next/navigation";

    export function EditProviderPage({ providerId }) {
      const router = useRouter();

      return (
        <SsoProviderEdit
          providerId={providerId}
          backButton={{
            onClick: () => router.push("/providers"),
          }}
          sso={{
            updateAction: {
              onAfter: () => console.log("Provider updated"),
            },
          }}
        />
      );
    }
    ```

    <Accordion title="Full integration example">
      ```tsx wrap lines theme={null}
      import React from "react";
      import { SsoProviderEdit } from "@auth0/universal-components-react";
      import { useRouter, useSearchParams } from "next/navigation";
      import { analytics } from "./lib/analytics";

      function EditProviderPage() {
        const router = useRouter();
        const searchParams = useSearchParams();
        const providerId = searchParams.get("id");

        return (
          <div className="max-w-4xl mx-auto p-6">
            <SsoProviderEdit
              providerId={providerId}
              backButton={{
                onClick: () => router.push("/providers"),
              }}
              sso={{
                updateAction: {
                  onAfter: (provider) => {
                    analytics.track("Provider Updated", { name: provider.name });
                    toast.success("Provider configuration saved");
                  },
                },
                deleteAction: {
                  onBefore: (provider) => {
                    return confirm(
                      `Delete "${provider.display_name}"? This cannot be undone.`,
                    );
                  },
                  onAfter: () => {
                    toast.success("Provider deleted");
                    router.push("/providers");
                  },
                },
              }}
              provisioning={{
                createAction: {
                  onAfter: () => toast.success("SCIM provisioning enabled"),
                },
                createScimTokenAction: {
                  onAfter: () =>
                    toast.info("Copy your SCIM token - it won't be shown again"),
                },
              }}
              domains={{
                verifyAction: {
                  onAfter: (domain) => {
                    toast.success(`${domain.domain} verified`);
                  },
                },
                deleteAction: {
                  onBefore: (domain) => confirm(`Delete ${domain.domain}?`),
                },
              }}
              customMessages={{
                tabs: {
                  sso: "Configuration",
                  provisioning: "User Sync (SCIM)",
                  domains: "Linked Domains",
                },
              }}
              styling={{
                variables: {
                  common: { "--color-primary": "#059669" },
                },
              }}
            />
          </div>
        );
      }

      export default EditProviderPage;
      ```
    </Accordion>

    ## Props

    ### Core props

    Core props are fundamental to the component's operation. `SsoProviderEdit` requires the provider ID to load and edit the correct provider.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>providerId</code>
          </td>

          <td>
            <code>string</code>
          </td>

          <td>
            <strong>Required.</strong> The SSO provider ID to edit.
          </td>
        </tr>
      </tbody>
    </table>

    ***

    ### Display props

    Display props control how the component renders without affecting its behavior.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>hideHeader</code>
          </td>

          <td>
            <code>boolean</code>
          </td>

          <td>
            Hide the header section. Default: <code>false</code>
          </td>
        </tr>
      </tbody>
    </table>

    ***

    ### Action props

    User interactions across the three tabs are handled by several action props that are organized under the respective tab's name (`sso`, `provisioning`, and `domains`).

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>backButton</code>
          </td>

          <td>
            <code>Object</code>
          </td>

          <td>
            Back button configuration.
          </td>
        </tr>

        <tr>
          <td>
            <code>sso</code>
          </td>

          <td>
            <code>SsoProviderTabEditProps</code>
          </td>

          <td>
            SSO tab actions. <a href="#sso-tab-actions">Details</a>
          </td>
        </tr>

        <tr>
          <td>
            <code>provisioning</code>
          </td>

          <td>
            <code>SsoProvisioningTabEditProps</code>
          </td>

          <td>
            Provisioning tab actions.
            <a href="#provisioning-tab-actions">Details</a>
          </td>
        </tr>

        <tr>
          <td>
            <code>domains</code>
          </td>

          <td>
            <code>SsoDomainsTabEditProps</code>
          </td>

          <td>
            Domains tab actions. <a href="#domains-tab-actions">Details</a>
          </td>
        </tr>
      </tbody>
    </table>

    **backButton**

    **Type:** `{ icon?: LucideIcon; onClick: (e: MouseEvent) => void }`

    Configures the back button in the component header. Use this to navigate back to your providers list.

    **Properties:**

    * `icon`—Custom Lucide icon component (optional, defaults to ArrowLeft)
    * `onClick`—Click handler for navigation

    **Example:**

    ```tsx wrap lines theme={null}
    import { ChevronLeft } from "lucide-react";

    <SsoProviderEdit
      providerId={providerId}
      backButton={{
        icon: ChevronLeft,
        onClick: () => router.push("/providers"),
      }}
    />;
    ```

    ***

    ### SSO tab actions

    The `sso` prop configures actions for the SSO settings tab. This tab manages the provider's authentication configuration.

    <table class="table">
      <thead>
        <tr>
          <th>Action</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>updateAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider, IdentityProvider></code>
          </td>

          <td>
            Update provider settings.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Delete provider permanently.
          </td>
        </tr>

        <tr>
          <td>
            <code>removeFromOrganizationAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Remove from organization.
          </td>
        </tr>
      </tbody>
    </table>

    **sso.updateAction**

    **Type:** `ComponentAction<IdentityProvider, IdentityProvider>`

    Controls saving changes to provider configuration (client ID, secrets, certificates, etc.).

    **Properties:**

    * `disabled`—Disable the save button
    * `onBefore(provider)`—Runs before the update. Return `false` to prevent saving (for example, to show a confirmation dialog).
    * `onAfter(provider, result)`—Runs after the provider is successfully updated. Use this to show a notification or track the event.

    **Example:**

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      sso={{
        updateAction: {
          onBefore: (provider) => {
            return confirm("Save changes to provider configuration?");
          },
          onAfter: (provider) => {
            toast.success("Provider configuration saved");
            analytics.track("Provider Updated", { name: provider.name });
          },
        },
      }}
    />
    ```

    ***

    **sso.deleteAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Controls permanent deletion of the provider from your Auth0 tenant.

    **Example:**

    ```tsx wrap lines theme={null}
    sso={{
      deleteAction: {
        onBefore: (provider) => {
          return confirm(`Permanently delete "${provider.display_name}"? This cannot be undone.`);
        },
        onAfter: () => router.push("/providers"),
      },
    }}
    ```

    ***

    **sso.removeFromOrganizationAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Controls removing the provider from the organization without deleting it. The provider remains available to be re-added later.

    **Example:**

    ```tsx wrap lines theme={null}
    sso={{
      removeFromOrganizationAction: {
        onBefore: (provider) => {
          return confirm(`Remove "${provider.display_name}" from this organization?`);
        },
        onAfter: () => router.push("/providers"),
      },
    }}
    ```

    ***

    ### Provisioning tab actions

    The `provisioning` prop configures actions for the SCIM provisioning tab. This tab manages automated user provisioning via the SCIM protocol.

    <table class="table">
      <thead>
        <tr>
          <th>Action</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>createAction</code>
          </td>

          <td>
            <code>
              ComponentAction\<IdentityProvider,
              CreateIdPProvisioningConfigResponseContent>
            </code>
          </td>

          <td>
            Enable SCIM provisioning.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Disable SCIM provisioning.
          </td>
        </tr>

        <tr>
          <td>
            <code>createScimTokenAction</code>
          </td>

          <td>
            <code>
              ComponentAction\<IdentityProvider,
              CreateIdpProvisioningScimTokenResponseContent>
            </code>
          </td>

          <td>
            Generate SCIM token.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteScimTokenAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Revoke SCIM token.
          </td>
        </tr>
      </tbody>
    </table>

    **provisioning.createAction**

    **Type:** `ComponentAction<IdentityProvider, CreateIdPProvisioningConfigResponseContent>`

    Enables SCIM provisioning for the provider. Once enabled, you can generate a SCIM token for your identity provider to use.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      createAction: {
        onBefore: (provider) => {
          return confirm("Enable SCIM provisioning for this provider?");
        },
        onAfter: (provider, config) => {
          toast.success("SCIM provisioning enabled");
          console.log("SCIM endpoint:", config.scim_endpoint);
        },
      },
    }}
    ```

    ***

    **provisioning.deleteAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Disables SCIM provisioning and removes all provisioning configuration for that identity provider.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      deleteAction: {
        onBefore: (provider) => {
          return confirm("Disable SCIM provisioning? This will stop automatic user sync.");
        },
        onAfter: () => toast.success("SCIM provisioning disabled"),
      },
    }}
    ```

    ***

    **provisioning.createScimTokenAction**

    **Type:** `ComponentAction<IdentityProvider, CreateIdpProvisioningScimTokenResponseContent>`

    Generates a new SCIM bearer token for your identity provider to authenticate with Auth0.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      createScimTokenAction: {
        onAfter: (provider, tokenResponse) => {
          // Token is shown once - user should copy it immediately
          console.log("New SCIM token generated");
        },
      },
    }}
    ```

    ***

    **provisioning.deleteScimTokenAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Revokes the SCIM token. The identity provider will no longer be able to sync users until a new token is generated.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      deleteScimTokenAction: {
        onBefore: () => {
          return confirm("Revoke SCIM token? Your identity provider will lose access immediately.");
        },
      },
    }}
    ```

    ***

    ### Domains tab actions

    The `domains` prop configures actions for the domains tab. This tab manages domains associated with the provider for automatic user routing.

    <table class="table">
      <thead>
        <tr>
          <th>Action</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>createAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain></code>
          </td>

          <td>
            Add a domain.
          </td>
        </tr>

        <tr>
          <td>
            <code>verifyAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain></code>
          </td>

          <td>
            Verify domain ownership.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain></code>
          </td>

          <td>
            Delete a domain.
          </td>
        </tr>

        <tr>
          <td>
            <code>associateToProviderAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain, IdentityProvider | null></code>
          </td>

          <td>
            Associate domain to provider.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteFromProviderAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain, IdentityProvider | null></code>
          </td>

          <td>
            Remove domain from provider.
          </td>
        </tr>
      </tbody>
    </table>

    **domains.createAction**

    **Type:** `ComponentAction<Domain>`

    Controls adding new domains to the organization from within the provider edit interface.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      createAction: {
        onAfter: (domain) => {
          toast.success(`Domain ${domain.domain} added`);
        },
      },
    }}
    ```

    ***

    **domains.verifyAction**

    **Type:** `ComponentAction<Domain>`

    Controls domain verification via DNS TXT record.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      verifyAction: {
        onBefore: (domain) => {
          return confirm(`Verify ${domain.domain}? Ensure your DNS record is configured.`);
        },
        onAfter: (domain) => {
          toast.success(`${domain.domain} verified successfully`);
        },
      },
    }}
    ```

    ***

    **domains.deleteAction**

    **Type:** `ComponentAction<Domain>`

    Controls domain deletion.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      deleteAction: {
        onBefore: (domain) => {
          return confirm(`Delete ${domain.domain}?`);
        },
      },
    }}
    ```

    ***

    **domains.associateToProviderAction**

    **Type:** `ComponentAction<Domain, IdentityProvider | null>`

    Associates a verified domain with this SSO provider for automatic user routing.

    **Example:**

    ```tsx wrap lines theme={null}
    domains{{
      associateToProviderAction: {
        onAfter: (domain, provider) => {
          console.log(`${domain.domain} now routes to ${provider?.name}`);
        },
      },
    }}
    ```

    ***

    **domains.deleteFromProviderAction**

    **Type:** `ComponentAction<Domain, IdentityProvider | null>`

    Removes a domain's association with this provider.

    ***

    ### Customization props

    Customization props let you adapt the component to your brand, locale, and validation requirements without modifying source code.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>schema</code>
          </td>

          <td>
            <code>SsoProviderEditSchema</code>
          </td>

          <td>
            Field validation rules.
          </td>
        </tr>

        <tr>
          <td>
            <code>customMessages</code>
          </td>

          <td>
            <code>Partial\<SsoProviderEditMessages></code>
          </td>

          <td>
            i18n text overrides.
          </td>
        </tr>

        <tr>
          <td>
            <code>styling</code>
          </td>

          <td>
            <code>ComponentStyling\<SsoProviderEditClasses></code>
          </td>

          <td>
            CSS variables and class overrides.
          </td>
        </tr>
      </tbody>
    </table>

    **schema**

    Set custom validation rules for provider and domain fields.

    <Accordion title="Available Schema Fields">
      All schema fields support: `regex`, `errorMessage`, `minLength`, `maxLength`, `required`

      **provider.\***—Provider configuration fields by strategy

      * Common: `name`, `displayName`
      * Strategy-specific fields (same as SsoProviderCreate)

      **domains.create.domainUrl**—Domain URL validation
    </Accordion>

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      schema={{
        provider: {
          displayName: {
            required: true,
            maxLength: 100,
          },
        },
        domains: {
          create: {
            domainUrl: {
              regex: /^[a-z0-9.-]+\.[a-z]{2,}$/,
              errorMessage: "Enter a valid domain (example.com)",
            },
          },
        },
      }}
    />
    ```

    ***

    **customMessages**

    Customize all text and translations. All fields are optional and use defaults if not provided.

    <Accordion title="Available Messages">
      **header**—Component header

      * `title`, `back_button_text`

      **tabs**—Tab labels

      * `sso`, `provisioning`, `domains`

      **sso\_tab**—SSO settings tab

      * `title`, `description`
      * `fields.*`—Form field labels by strategy
      * `actions.save_button_text`, `actions.delete_button_text`
      * `delete_modal.*`, `remove_modal.*`

      **provisioning\_tab**—Provisioning tab

      * `title`, `description`
      * `scim_endpoint.label`, `scim_token.label`
      * `actions.enable_button_text`, `actions.disable_button_text`
      * `actions.generate_token_button_text`, `actions.revoke_token_button_text`

      **domains\_tab**—Domains tab

      * `title`, `description`
      * Same structure as DomainTable messages

      **notifications**—API responses

      * `provider_update_success`, `provider_delete_success`
      * `provisioning_enable_success`, `provisioning_disable_success`
      * `scim_token_create_success`, `scim_token_delete_success`
      * Domain-related notifications
    </Accordion>

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      customMessages={{
        header: {
          title: "Edit Provider",
        },
        tabs: {
          sso: "Settings",
          provisioning: "User Sync",
          domains: "Domains",
        },
        sso_tab: {
          actions: {
            save_button_text: "Save Changes",
          },
        },
        notifications: {
          provider_update_success: "Provider saved successfully!",
        },
      }}
    />
    ```

    ***

    **styling**

    Customize appearance with CSS variables and class overrides. Supports theme-aware styling.

    <Accordion title="Available Styling Options">
      **Variables**—CSS custom properties

      * `common`—Applied to all themes
      * `light`—Light theme only
      * `dark`—Dark theme only

      **Classes**—Component class overrides

      * `SsoProviderEdit-header`
      * `SsoProviderEdit-tabs`
      * `SsoProviderEdit-ssoTab`
      * `SsoProviderEdit-provisioningTab`
      * `SsoProviderEdit-domainsTab`
    </Accordion>

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      styling={{
        variables: {
          common: {
            "--font-size-title": "1.5rem",
          },
          light: {
            "--color-primary": "#059669",
          },
        },
        classes: {
          "SsoProviderEdit-tabs": "border-b border-gray-200",
        },
      }}
    />
    ```

    ***

    ## Advanced customization

    The `SsoProviderEdit` component is composed of smaller subcomponents and hooks. You can import them individually to build custom provider editing workflows.

    ### Available subcomponents

    For advanced use cases, you can import individual subcomponents to embed specific tabs or sections in different contexts.

    <table class="table">
      <thead>
        <tr>
          <th>Component</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>SsoProviderSsoTab</code>
          </td>

          <td>SSO configuration form</td>
        </tr>

        <tr>
          <td>
            <code>SsoProviderProvisioningTab</code>
          </td>

          <td>SCIM provisioning management</td>
        </tr>

        <tr>
          <td>
            <code>SsoProviderDomainsTab</code>
          </td>

          <td>Domain association management</td>
        </tr>

        <tr>
          <td>
            <code>ProviderConfigureFields</code>
          </td>

          <td>Dynamic form fields by strategy</td>
        </tr>

        <tr>
          <td>
            <code>ScimTokenDisplay</code>
          </td>

          <td>SCIM token display with copy functionality</td>
        </tr>
      </tbody>
    </table>

    ### Available hooks

    These hooks provide the underlying logic without any UI. Use them to build completely custom interfaces while leveraging the Auth0 API integration.

    <table class="table">
      <thead>
        <tr>
          <th>Hook</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>useSsoProviderEdit</code>
          </td>

          <td>Provider loading and update logic</td>
        </tr>

        <tr>
          <td>
            <code>useSsoProviderProvisioning</code>
          </td>

          <td>SCIM provisioning management</td>
        </tr>

        <tr>
          <td>
            <code>useSsoProviderDomains</code>
          </td>

          <td>Domain association management</td>
        </tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="shadcn">
    ## Setup requirements

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      **Auth0 Configuration Required**—Ensure your tenant is configured with the
      My Organization API. [View setup guide
      →](/docs/get-started/universal-components/web/components/build-delegated-admin#configure-auth0-dashboard)
    </Callout>

    ## Installation

    ```bash wrap lines theme={null}
    npx shadcn@latest add https://auth0-universal-components.vercel.app/r/my-organization/sso-provider-edit.json
    ```

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      Running the shadcn command also installs the @auth0/universal-components-core dependency for shared utilities and Auth0 integration.
    </Callout>

    ## Get started

    ```tsx wrap lines theme={null}
    import { SsoProviderEdit } from "@/components/auth0/my-organization/sso-provider-edit";

    export function EditProviderPage({ providerId }) {
      const navigate = useNavigate();

      return (
        <SsoProviderEdit
          providerId={providerId}
          backButton={{
            onClick: () => navigate("/providers"),
          }}
          sso={{
            updateAction: {
              onAfter: () => console.log("Provider updated"),
            },
          }}
        />
      );
    }
    ```

    <Accordion title="Full integration example">
      ```tsx wrap lines theme={null}
      import React from "react";
      import { SsoProviderEdit } from "@/components/auth0/my-organization/sso-provider-edit";
      import { Auth0Provider } from "@auth0/auth0-react";
      import { Auth0ComponentProvider } from "@auth0/universal-components-react/spa";
      import { useNavigate, useParams } from "react-router-dom";
      import { analytics } from "./lib/analytics";

      function EditProviderPage() {
        const { providerId } = useParams();
        const navigate = useNavigate();

        return (
          <div className="max-w-4xl mx-auto p-6">
            <SsoProviderEdit
              providerId={providerId}
              backButton={{
                onClick: () => navigate("/providers"),
              }}
              sso={{
                updateAction: {
                  onAfter: (provider) => {
                    analytics.track("Provider Updated", { name: provider.name });
                    toast.success("Provider configuration saved");
                  },
                },
                deleteAction: {
                  onBefore: (provider) => {
                    return confirm(
                      `Delete "${provider.display_name}"? This cannot be undone.`,
                    );
                  },
                  onAfter: () => {
                    toast.success("Provider deleted");
                    navigate("/providers");
                  },
                },
              }}
              provisioning={{
                createAction: {
                  onAfter: () => toast.success("SCIM provisioning enabled"),
                },
                createScimTokenAction: {
                  onAfter: () =>
                    toast.info("Copy your SCIM token - it won't be shown again"),
                },
              }}
              domains={{
                verifyAction: {
                  onAfter: (domain) => {
                    toast.success(`${domain.domain} verified`);
                  },
                },
                deleteAction: {
                  onBefore: (domain) => confirm(`Delete ${domain.domain}?`),
                },
              }}
              customMessages={{
                tabs: {
                  sso: "Configuration",
                  provisioning: "User Sync (SCIM)",
                  domains: "Linked Domains",
                },
              }}
              styling={{
                variables: {
                  common: { "--color-primary": "#059669" },
                },
              }}
            />
          </div>
        );
      }

      export default function App() {
        const domain = "your-domain.auth0.com";

        return (
          <Auth0Provider
            domain={domain}
            clientId="your-client-id"
            authorizationParams={{
              redirect_uri: window.location.origin,
            }}
            interactiveErrorHandler="popup" // Required to handle step-up auth challenges via Universal Login popup
          >
            <Auth0ComponentProvider domain={domain}>
              <EditProviderPage />
            </Auth0ComponentProvider>
          </Auth0Provider>
        );
      }

      ```
    </Accordion>

    ## Props

    ### Core props

    Core props are fundamental to the component's operation. `SsoProviderEdit` requires the provider ID to load and edit the correct provider.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>providerId</code>
          </td>

          <td>
            <code>string</code>
          </td>

          <td>
            <strong>Required.</strong> The SSO provider ID to edit.
          </td>
        </tr>
      </tbody>
    </table>

    ***

    ### Display props

    Display props control how the component renders without affecting its behavior.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>hideHeader</code>
          </td>

          <td>
            <code>boolean</code>
          </td>

          <td>
            Hide the header section. Default: <code>false</code>
          </td>
        </tr>
      </tbody>
    </table>

    ***

    ### Action props

    User interactions across the three tabs are handled by several action props that are organized under the respective tab's name (`sso`, `provisioning`, and `domains`).

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>backButton</code>
          </td>

          <td>
            <code>Object</code>
          </td>

          <td>
            Back button configuration.
          </td>
        </tr>

        <tr>
          <td>
            <code>sso</code>
          </td>

          <td>
            <code>SsoProviderTabEditProps</code>
          </td>

          <td>
            SSO tab actions. <a href="#sso-tab-actions">Details</a>
          </td>
        </tr>

        <tr>
          <td>
            <code>provisioning</code>
          </td>

          <td>
            <code>SsoProvisioningTabEditProps</code>
          </td>

          <td>
            Provisioning tab actions.
            <a href="#provisioning-tab-actions">Details</a>
          </td>
        </tr>

        <tr>
          <td>
            <code>domains</code>
          </td>

          <td>
            <code>SsoDomainsTabEditProps</code>
          </td>

          <td>
            Domains tab actions. <a href="#domains-tab-actions">Details</a>
          </td>
        </tr>
      </tbody>
    </table>

    **backButton**

    **Type:** `{ icon?: LucideIcon; onClick: (e: MouseEvent) => void }`

    Configures the back button in the component header. Use this to navigate back to your providers list.

    **Properties:**

    * `icon`—Custom Lucide icon component (optional, defaults to ArrowLeft)
    * `onClick`—Click handler for navigation

    **Example:**

    ```tsx wrap lines theme={null}
    import { ChevronLeft } from "lucide-react";

    <SsoProviderEdit
      providerId={providerId}
      backButton={{
        icon: ChevronLeft,
        onClick: () => navigate("/providers"),
      }}
    />;
    ```

    ***

    ### SSO tab actions

    The `sso` prop configures actions for the SSO settings tab. This tab manages the provider's authentication configuration.

    <table class="table">
      <thead>
        <tr>
          <th>Action</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>updateAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider, IdentityProvider></code>
          </td>

          <td>
            Update provider settings.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Delete provider permanently.
          </td>
        </tr>

        <tr>
          <td>
            <code>removeFromOrganizationAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Remove from organization.
          </td>
        </tr>
      </tbody>
    </table>

    **sso.updateAction**

    **Type:** `ComponentAction<IdentityProvider, IdentityProvider>`

    Controls saving changes to provider configuration (client ID, secrets, certificates, etc.).

    **Properties:**

    * `disabled`—Disable the save button
    * `onBefore(provider)`—Runs before the update. Return `false` to prevent saving (for example, to show a confirmation dialog).
    * `onAfter(provider, result)`—Runs after the provider is successfully updated. Use this to show a notification or track the event.

    **Example:**

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      sso={{
        updateAction: {
          onBefore: (provider) => {
            return confirm("Save changes to provider configuration?");
          },
          onAfter: (provider) => {
            toast.success("Provider configuration saved");
            analytics.track("Provider Updated", { name: provider.name });
          },
        },
      }}
    />
    ```

    ***

    **sso.deleteAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Controls permanent deletion of the provider from your Auth0 tenant.

    **Example:**

    ```tsx wrap lines theme={null}
    sso={{
      deleteAction: {
        onBefore: (provider) => {
          return confirm(`Permanently delete "${provider.display_name}"? This cannot be undone.`);
        },
        onAfter: () => navigate("/providers"),
      },
    }}
    ```

    ***

    **sso.removeFromOrganizationAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Controls removing the provider from the organization without deleting it. The provider remains available to be re-added later.

    **Example:**

    ```tsx wrap lines theme={null}
    sso={{
      removeFromOrganizationAction: {
        onBefore: (provider) => {
          return confirm(`Remove "${provider.display_name}" from this organization?`);
        },
        onAfter: () => navigate("/providers"),
      },
    }}
    ```

    ***

    ### Provisioning tab actions

    The `provisioning` prop configures actions for the SCIM provisioning tab. This tab manages automated user provisioning via the SCIM protocol.

    <table class="table">
      <thead>
        <tr>
          <th>Action</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>createAction</code>
          </td>

          <td>
            <code>
              ComponentAction\<IdentityProvider,
              CreateIdPProvisioningConfigResponseContent>
            </code>
          </td>

          <td>
            Enable SCIM provisioning.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Disable SCIM provisioning.
          </td>
        </tr>

        <tr>
          <td>
            <code>createScimTokenAction</code>
          </td>

          <td>
            <code>
              ComponentAction\<IdentityProvider,
              CreateIdpProvisioningScimTokenResponseContent>
            </code>
          </td>

          <td>
            Generate SCIM token.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteScimTokenAction</code>
          </td>

          <td>
            <code>ComponentAction\<IdentityProvider></code>
          </td>

          <td>
            Revoke SCIM token.
          </td>
        </tr>
      </tbody>
    </table>

    **provisioning.createAction**

    **Type:** `ComponentAction<IdentityProvider, CreateIdPProvisioningConfigResponseContent>`

    Enables SCIM provisioning for the provider. Once enabled, you can generate a SCIM token for your identity provider to use.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      createAction: {
        onBefore: (provider) => {
          return confirm("Enable SCIM provisioning for this provider?");
        },
        onAfter: (provider, config) => {
          toast.success("SCIM provisioning enabled");
          console.log("SCIM endpoint:", config.scim_endpoint);
        },
      },
    }}
    ```

    ***

    **provisioning.deleteAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Disables SCIM provisioning and removes all provisioning configuration for that identity provider.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      deleteAction: {
        onBefore: (provider) => {
          return confirm("Disable SCIM provisioning? This will stop automatic user sync.");
        },
        onAfter: () => toast.success("SCIM provisioning disabled"),
      },
    }}
    ```

    ***

    **provisioning.createScimTokenAction**

    **Type:** `ComponentAction<IdentityProvider, CreateIdpProvisioningScimTokenResponseContent>`

    Generates a new SCIM bearer token for your identity provider to authenticate with Auth0.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      createScimTokenAction: {
        onAfter: (provider, tokenResponse) => {
          // Token is shown once - user should copy it immediately
          console.log("New SCIM token generated");
        },
      },
    }}
    ```

    ***

    **provisioning.deleteScimTokenAction**

    **Type:** `ComponentAction<IdentityProvider>`

    Revokes the SCIM token. The identity provider will no longer be able to sync users until a new token is generated.

    **Example:**

    ```tsx wrap lines theme={null}
    provisioning={{
      deleteScimTokenAction: {
        onBefore: () => {
          return confirm("Revoke SCIM token? Your identity provider will lose access immediately.");
        },
      },
    }}
    ```

    ***

    ### Domains tab actions

    The `domains` prop configures actions for the domains tab. This tab manages domains associated with the provider for automatic user routing.

    <table class="table">
      <thead>
        <tr>
          <th>Action</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>createAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain></code>
          </td>

          <td>
            Add a domain.
          </td>
        </tr>

        <tr>
          <td>
            <code>verifyAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain></code>
          </td>

          <td>
            Verify domain ownership.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain></code>
          </td>

          <td>
            Delete a domain.
          </td>
        </tr>

        <tr>
          <td>
            <code>associateToProviderAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain, IdentityProvider | null></code>
          </td>

          <td>
            Associate domain to provider.
          </td>
        </tr>

        <tr>
          <td>
            <code>deleteFromProviderAction</code>
          </td>

          <td>
            <code>ComponentAction\<Domain, IdentityProvider | null></code>
          </td>

          <td>
            Remove domain from provider.
          </td>
        </tr>
      </tbody>
    </table>

    **domains.createAction**

    **Type:** `ComponentAction<Domain>`

    Controls adding new domains to the organization from within the provider edit interface.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      createAction: {
        onAfter: (domain) => {
          toast.success(`Domain ${domain.domain} added`);
        },
      },
    }}
    ```

    ***

    **domains.verifyAction**

    **Type:** `ComponentAction<Domain>`

    Controls domain verification via DNS TXT record.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      verifyAction: {
        onBefore: (domain) => {
          return confirm(`Verify ${domain.domain}? Ensure your DNS record is configured.`);
        },
        onAfter: (domain) => {
          toast.success(`${domain.domain} verified successfully`);
        },
      },
    }}
    ```

    ***

    **domains.deleteAction**

    **Type:** `ComponentAction<Domain>`

    Controls domain deletion.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      deleteAction: {
        onBefore: (domain) => {
          return confirm(`Delete ${domain.domain}?`);
        },
      },
    }}
    ```

    ***

    **domains.associateToProviderAction**

    **Type:** `ComponentAction<Domain, IdentityProvider | null>`

    Associates a verified domain with this SSO provider for automatic user routing.

    **Example:**

    ```tsx wrap lines theme={null}
    domains={{
      associateToProviderAction: {
        onAfter: (domain, provider) => {
          console.log(`${domain.domain} now routes to ${provider?.name}`);
        },
      },
    }}
    ```

    ***

    **domains.deleteFromProviderAction**

    **Type:** `ComponentAction<Domain, IdentityProvider | null>`

    Removes a domain's association with this provider.

    ***

    ### Customization props

    Customization props let you adapt the component to your brand, locale, and validation requirements without modifying source code.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>schema</code>
          </td>

          <td>
            <code>SsoProviderEditSchema</code>
          </td>

          <td>
            Field validation rules.
          </td>
        </tr>

        <tr>
          <td>
            <code>customMessages</code>
          </td>

          <td>
            <code>Partial\<SsoProviderEditMessages></code>
          </td>

          <td>
            i18n text overrides.
          </td>
        </tr>

        <tr>
          <td>
            <code>styling</code>
          </td>

          <td>
            <code>ComponentStyling\<SsoProviderEditClasses></code>
          </td>

          <td>
            CSS variables and class overrides.
          </td>
        </tr>
      </tbody>
    </table>

    **schema**

    Set custom validation rules for provider and domain fields.

    <Accordion title="Available Schema Fields">
      All schema fields support: `regex`, `errorMessage`, `minLength`, `maxLength`, `required`

      **provider.\***—Provider configuration fields by strategy

      * Common: `name`, `displayName`
      * Strategy-specific fields (same as SsoProviderCreate)

      **domains.create.domainUrl**—Domain URL validation
    </Accordion>

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      schema={{
        provider: {
          displayName: {
            required: true,
            maxLength: 100,
          },
        },
        domains: {
          create: {
            domainUrl: {
              regex: /^[a-z0-9.-]+\.[a-z]{2,}$/,
              errorMessage: "Enter a valid domain (example.com)",
            },
          },
        },
      }}
    />
    ```

    ***

    **customMessages**

    Customize all text and translations. All fields are optional and use defaults if not provided.

    <Accordion title="Available Messages">
      **header**—Component header

      * `title`, `back_button_text`

      **tabs**—Tab labels

      * `sso`, `provisioning`, `domains`

      **sso\_tab**—SSO settings tab

      * `title`, `description`
      * `fields.*`—Form field labels by strategy
      * `actions.save_button_text`, `actions.delete_button_text`
      * `delete_modal.*`, `remove_modal.*`

      **provisioning\_tab**—Provisioning tab

      * `title`, `description`
      * `scim_endpoint.label`, `scim_token.label`
      * `actions.enable_button_text`, `actions.disable_button_text`
      * `actions.generate_token_button_text`, `actions.revoke_token_button_text`

      **domains\_tab**—Domains tab

      * `title`, `description`
      * Same structure as DomainTable messages

      **notifications**—API responses

      * `provider_update_success`, `provider_delete_success`
      * `provisioning_enable_success`, `provisioning_disable_success`
      * `scim_token_create_success`, `scim_token_delete_success`
      * Domain-related notifications
    </Accordion>

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      customMessages={{
        header: {
          title: "Edit Provider",
        },
        tabs: {
          sso: "Settings",
          provisioning: "User Sync",
          domains: "Domains",
        },
        sso_tab: {
          actions: {
            save_button_text: "Save Changes",
          },
        },
        notifications: {
          provider_update_success: "Provider saved successfully!",
        },
      }}
    />
    ```

    ***

    **styling**

    Customize appearance with CSS variables and class overrides. Supports theme-aware styling.

    <Accordion title="Available Styling Options">
      **Variables**—CSS custom properties

      * `common`—Applied to all themes
      * `light`—Light theme only
      * `dark`—Dark theme only

      **Classes**—Component class overrides

      * `SsoProviderEdit-header`
      * `SsoProviderEdit-tabs`
      * `SsoProviderEdit-ssoTab`
      * `SsoProviderEdit-provisioningTab`
      * `SsoProviderEdit-domainsTab`
    </Accordion>

    ```tsx wrap lines theme={null}
    <SsoProviderEdit
      providerId={providerId}
      styling={{
        variables: {
          common: {
            "--font-size-title": "1.5rem",
          },
          light: {
            "--color-primary": "#059669",
          },
        },
        classes: {
          "SsoProviderEdit-tabs": "border-b border-gray-200",
        },
      }}
    />
    ```

    ***

    ## Advanced customization

    The `SsoProviderEdit` component is composed of smaller subcomponents and hooks. You can import them individually to build custom SSO provider management workflows if you use shadcn.

    ### Available subcomponents

    For advanced use cases, you can import individual tab components to build custom provider editing interfaces.

    <table class="table">
      <thead>
        <tr>
          <th>Component</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>SsoProviderEditTabs</code>
          </td>

          <td>Tab container and navigation</td>
        </tr>

        <tr>
          <td>
            <code>SsoTab</code>
          </td>

          <td>SSO settings configuration tab</td>
        </tr>

        <tr>
          <td>
            <code>ProvisioningTab</code>
          </td>

          <td>SCIM provisioning tab</td>
        </tr>

        <tr>
          <td>
            <code>DomainsTab</code>
          </td>

          <td>Domain associations tab</td>
        </tr>
      </tbody>
    </table>

    ### Available hooks

    These hooks provide the underlying logic without any UI. Use them to build completely custom interfaces while leveraging the Auth0 API integration.

    <table class="table">
      <thead>
        <tr>
          <th>Hook</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>useSsoProviderEdit</code>
          </td>

          <td>Provider fetching and editing logic</td>
        </tr>

        <tr>
          <td>
            <code>useSsoProviderEditLogic</code>
          </td>

          <td>Tab state and action handlers</td>
        </tr>
      </tbody>
    </table>
  </Tab>
</Tabs>
