> ## Documentation Index
> Fetch the complete documentation index at: https://auth0-actions-modules-ga.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Litmos 向けに SAML2 Web App アドオンを使用して、Auth0 をアイデンティティプロバイダーとして設定する方法を説明します。

# Litmos を SAML サービスプロバイダーとして設定する

export const AuthCodeBlock = ({filename, icon, language, highlight, children}) => {
  const [displayText, setDisplayText] = useState(children);
  const [copyText, setCopyText] = useState(children);
  const wrapperRef = React.useRef(null);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      if (!window.autorun || !window.rootStore) {
        return;
      }
      unsubscribe = window.autorun(() => {
        let processedChildrenForDisplay = children;
        let processedChildrenForCopy = children;
        for (const [key, value] of window.rootStore.variableStore.values.entries()) {
          const escapedKey = key.replaceAll(/[.*+?^${}()|[\]\\]/g, (String.raw)`\$&`);
          let displayValue = value;
          if (key === "{yourClientSecret}" && value !== "{yourClientSecret}") {
            displayValue = value.substring(0, 3) + "*****MASKED*****";
          }
          processedChildrenForDisplay = processedChildrenForDisplay.replaceAll(new RegExp(escapedKey, "g"), displayValue);
          processedChildrenForCopy = processedChildrenForCopy.replaceAll(new RegExp(escapedKey, "g"), value);
        }
        setDisplayText(processedChildrenForDisplay);
        setCopyText(processedChildrenForCopy);
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  useEffect(() => {
    if (!wrapperRef.current) return;
    const originalWriteText = navigator.clipboard.writeText.bind(navigator.clipboard);
    let isOverriding = false;
    const handleClick = e => {
      const button = e.target.closest('[data-testid="copy-code-button"]');
      if (!button || !wrapperRef.current.contains(button)) return;
      isOverriding = true;
      navigator.clipboard.writeText = text => {
        if (isOverriding) {
          isOverriding = false;
          navigator.clipboard.writeText = originalWriteText;
          return originalWriteText(copyText);
        }
        return originalWriteText(text);
      };
      setTimeout(() => {
        if (isOverriding) {
          isOverriding = false;
          navigator.clipboard.writeText = originalWriteText;
        }
      }, 100);
    };
    const wrapper = wrapperRef.current;
    wrapper.addEventListener('click', handleClick, true);
    return () => {
      wrapper.removeEventListener('click', handleClick, true);
      if (navigator.clipboard.writeText !== originalWriteText) {
        navigator.clipboard.writeText = originalWriteText;
      }
    };
  }, [copyText]);
  return <div ref={wrapperRef}>
      <CodeBlock filename={filename} icon={icon} language={language} lines highlight={highlight}>
        {displayText}
      </CodeBlock>
    </div>;
};

export const codeExample = `{
  "mappings": {
    "user_id":     "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
    "email":       "Email",
    "given_name":  "FirstName",
    "family_name": "LastName"
  },
  "createUpnClaim":       false,
  "passthroughClaimsWithNoMapping": false,
  "mapUnknownClaimsAsIs": false,
  "mapIdentities":        false,
  "signatureAlgorithm":   "rsa-sha1",
  "digestAlgorithm":      "sha1",
  "destination":          "https://{yourDomain}.litmos.com/integration/samllogin",
  "lifetimeInSeconds":    3600,
  "signResponse":         false,
  "nameIdentifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
  "nameIdentifierProbes": [
    "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
  ]
}`;

Litmos では、以下の <Tooltip tip="Security Assertion Markup Language (SAML): パスワードなしで 2 者間で認証情報をやり取りできる標準化されたプロトコル。" cta="用語集を表示" href="/docs/ja-jp/glossary?term=SAML">SAML</Tooltip> 設定を使用します。

1. [Auth0 Dashboard > アプリケーション > アプリケーション](https://manage.auth0.com/#/applications) に移動し、新しいアプリケーションを作成するか、更新するアプリケーションの名前をクリックします。

2. **アドオン** タブに移動し、**SAML2 Web App** のトグルを有効にします。

3. **設定** タブで、**Application Callback URL** を次のように設定します: `https://{yourDomain}.litmos.com/integration/samllogin`。

   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/auth0-actions-modules-ga/docs/images/cdy7uua7fh8z/6dJgYkcOgMZ73HVTkAWt1x/fe9dbbf306e6c587cb3326c00a3b4e1f/2025-02-27_13-59-00.png" alt="Auth0 Dashboard アプリケーション アプリケーション アドオン タブ SAML2 Web App 設定 タブ" />
   </Frame>

4. 次のコードを **設定** テキストボックスに貼り付け、**Debug** をクリックします。

   <AuthCodeBlock children={codeExample} language="json" />

5. ページの一番下までスクロールし、**Enable** をクリックします。

6. **使用状況** タブで **Identity Provider Metadata** を見つけて、**Download** をクリックし、メタデータファイルをダウンロードします。これは、Auth0 をアイデンティティプロバイダーとして設定する際に必要です。

   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/auth0-actions-modules-ga/docs/images/cdy7uua7fh8z/3T90BDpyTXFUWDp1JkncBU/86bdba6bed8130b34b42b25c9bf2d232/dashboard-applications-applications-addons-saml2-web-app-usage.png" alt="Auth0 Dashboard アプリケーション アプリケーション アドオン タブ SAML2 Web App 使用状況 タブ" />
   </Frame>
