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

# Configure LitmosをSAMLサービスプロバイダーとして構成する

> Litmos用のSAML2 Webアプリアドオンを使用して、Auth0をIDプロバイダーとして構成する方法を説明します。

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 data-tooltip-id="react-containers-DefinitionTooltip-1" href="/docs/ja-jp/glossary?term=security-assertion-markup-language" tip="Security Assertion Markup Language（SAML）: パスワードなしに二者間で認証情報を交換できる標準化プロトコル。" cta="用語集の表示">SAML</Tooltip>構成を使用します。

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

2. **［Addons（アドオン）］** タブに移動し、 **［SAML2 Web App（SAML2 Webアプリ）］** トグルを有効にします。

3. **［Settings（設定）］** タブで、 **［Application CallbackURL（アプリケーションのコールバックURL）］** を`https://{yourDomain}.litmos.com/integration/samllogin`.

   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/ja-jp/cdy7uua7fh8z/6dJgYkcOgMZ73HVTkAWt1x/0126f55506d82cfd73d0bcb7ebd6fa9f/2025-02-27_14-00-16.png" alt="Dashboard アプリケーション アプリケーションアドオンタブ SAML2 Webアプリ 設定タブ" />
   </Frame>

4. 以下のコードを **［Settings（設定）］** テキストボックスに貼り付け、 **［Debug（デバッグ）］** をクリックします。

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

5. ページの最後までスクロールし、 **［Enable（有効）］** をクリックします。

6. **［Usage（使用状況）］** タブで **［Identity Provider Metadata（IDプロバイダーのメタデータ）］** を見つけ、 **［Download（ダウンロード）］** をクリックしてメタデータファイルをダウンロードします。これは、Auth0をIDプロバイダーとして構成する際に必要になります。

   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/ja-jp/cdy7uua7fh8z/3T90BDpyTXFUWDp1JkncBU/20060887bf494416b5831075fd4fce13/2025-01-28_10-16-30.png" alt="Dashboard アプリケーション アプリケーションアドオンタブ SAML2 Webアプリ 使用状況タブ" />
   </Frame>
