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

> エンタープライズ接続を使用して、OpenID Connect (OIDC) のIDプロバイダーに接続する方法について説明します。

# OpenID Connect IDプロバイダーへの接続

export const AuthCodeGroup = ({children, dropdown}) => {
  const [processedChildren, setProcessedChildren] = useState(children);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      unsubscribe = window.autorun(() => {
        const processChildren = node => {
          if (typeof node === "string") {
            let processedNode = node;
            for (const [key, value] of window.rootStore.variableStore.values.entries()) {
              const escapedKey = key.replaceAll(/[.*+?^${}()|[\]\\]/g, (String.raw)`\$&`);
              processedNode = processedNode.replaceAll(new RegExp(escapedKey, "g"), value);
            }
            return processedNode;
          } else if (Array.isArray(node)) {
            return node.map(processChildren);
          } else if (node && node.props && node.props.children) {
            return {
              ...node,
              props: {
                ...node.props,
                children: processChildren(node.props.children)
              }
            };
          }
          return node;
        };
        setProcessedChildren(processChildren(children));
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  return <CodeGroup dropdown={dropdown}>{processedChildren}</CodeGroup>;
};

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) + "*****マスク済み*****";
          }
          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>;
};

<div id="prerequisites">
  ## 前提条件
</div>

* [Auth0 にアプリケーションを登録する](/ja/docs/get-started/auth0-overview/create-applications)。

  * 適切な **Application Type** を選択します。
  * **Allowed Callback URL** に **`{https://yourApp/callback}`** を追加します。
  * アプリケーションの [Grant Types](/ja/docs/get-started/applications/update-grant-types) に、適切なフローが含まれていることを確認します。

<div id="steps">
  ## 手順
</div>

アプリケーションを OIDC <Tooltip tip="IDプロバイダー（IdP）: デジタルIDを保存および管理するサービス。" cta="用語集を表示" href="/ja/docs/glossary?term=Identity+Provider">IDプロバイダー</Tooltip> に接続するには、次の手順を実行する必要があります。

1. [OpenID Connect のIDプロバイダーでアプリを設定する](#set-up-your-app-in-the-openid-connect-identity-provider)
2. [Auth0 でエンタープライズ接続を作成する](#create-an-enterprise-connection-in-auth0)
3. [Auth0 アプリケーションでエンタープライズ接続を有効にする](#enable-the-enterprise-connection-for-your-auth0-application)
4. [接続をテストする](#test-the-connection)

<div id="set-up-your-app-in-the-openid-connect-identity-provider">
  ## OpenID Connect IDプロバイダーでアプリを設定する
</div>

ユーザーが OIDC IDプロバイダーを使用してログインできるようにするには、アプリケーションを IdP に登録する必要があります。この手順は OIDC IDプロバイダーによって異なるため、詳しくはお使いの IdP のドキュメントに従ってください。

通常、設定のどこかで次のコールバックURLを入力する必要があります: `https://{YOUR_AUTH0_DOMAIN}/login/callback`。

<Card title="リダイレクト用の Auth0 ドメイン名を確認する">
  上記に Auth0 ドメイン名が表示されておらず、[custom domains](/ja/docs/customize/custom-domains) 機能を使用していない場合、ドメイン名はテナント名、リージョンのサブドメイン、`auth0.com` をドット (`.`) で連結したものになります。

  たとえば、テナント名が `exampleco-enterprises` で、テナントが US リージョンにある場合、Auth0 ドメイン名は `exampleco-enterprises.us.auth0.com` となり、**Redirect URI** は `https://exampleco-enterprises.us.auth0.com/login/callback` になります。

  ただし、テナントが US リージョンにあり、2020 年 6 月より前に作成されている場合、Auth0 ドメイン名は `exampleco-enterprises.auth0.com` となり、**Redirect URI** は `https://exampleco-enterprises.auth0.com/login/callback` になります。

  [custom domains](/ja/docs/customize/custom-domains) を使用している場合、**Redirect URI** は `https://<YOUR CUSTOM DOMAIN>/login/callback` になります。
</Card>

このプロセスの間に、OIDC IDプロバイダーは登録された API の一意の識別子を生成します。通常、**<Tooltip tip="クライアントID: Auth0 が登録済みリソースに付与する識別値。" cta="用語集を見る" href="/ja/docs/glossary?term=Client+ID">クライアントID</Tooltip>** または **Application ID** と呼ばれます。この値は控えておいてください。後で必要になります。

<div id="create-an-enterprise-connection-in-auth0">
  ## Auth0 でエンタープライズ接続を作成する
</div>

Auth0 で OIDC エンタープライズ接続を設定する前に、OIDC プロバイダーでアプリを設定したときに生成された **アプリケーション (クライアント) ID** と **<Tooltip tip="クライアントシークレット: クライアント（アプリケーション）が認可サーバーに対して認証を行うために使用するシークレットです。クライアントと認可サーバーだけが知るべきもので、推測されないよう十分にランダムである必要があります。" cta="用語集を表示" href="/ja/docs/glossary?term=Client+secret">クライアントシークレット</Tooltip>** を用意しておいてください。

<div id="create-an-enterprise-connection-using-the-auth0-dashboard">
  ### Auth0 Dashboard を使用してエンタープライズ接続を作成する
</div>

<Warning>
  Auth0 Dashboard で設定できるようにするには、OpenID Connect (OIDC) IDプロバイダー (IdP) が [OIDC Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) をサポートしている必要があります。サポートしていない場合は、[Management API を使用して接続を設定](#configure-the-connection-using-the-management-api)できます。
</Warning>

1. [Auth0 Dashboard > Authentication > Enterprise](https://manage.auth0.com/#/connections/enterprise) に移動し、**Open ID Connect** を見つけて **Create** を選択します。

   <Frame>
     <img src="https://mintcdn.com/translations/eVsQcTnbClN-oB7d/docs/images/cdy7uua7fh8z/1fSTcrZpkgkPR64NnI1lr8/b3454e60a4463e99353603fd11a71983/Enterprise_Connections_-_EN.png?fit=max&auto=format&n=eVsQcTnbClN-oB7d&q=85&s=d70364390d8c16ca8efe20e3e1795db4" alt="Dashboard - Connections - Enterprise" width="600" height="561" data-path="docs/images/cdy7uua7fh8z/1fSTcrZpkgkPR64NnI1lr8/b3454e60a4463e99353603fd11a71983/Enterprise_Connections_-_EN.png" />
   </Frame>

2. 接続の詳細を入力し、**Create:** を選択します。

<Frame>
  <img src="https://mintcdn.com/translations/pvjQqAy3EB2TK6NP/docs/images/cdy7uua7fh8z/4PO4eBhEM3R0ZMhaTlDVfB/a46be0e0bdd58c4230ea118a9bca0eed/create-enterprise-oidc-connection.png?fit=max&auto=format&n=pvjQqAy3EB2TK6NP&q=85&s=14147a380e08d47095ef70dccd86c6ef" alt="Enter OIDC Connection Details" width="600" height="1256" data-path="docs/images/cdy7uua7fh8z/4PO4eBhEM3R0ZMhaTlDVfB/a46be0e0bdd58c4230ea118a9bca0eed/create-enterprise-oidc-connection.png" />
</Frame>

| **Field**                                      | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Purpose**                                    | 接続の用途を指定します。ユーザー認証、外部アカウントの Auth0 への接続、またはその両方に使用できます。詳細については、[User authentication vs Connected Accounts](/ja/docs/secure/tokens/token-vault/connected-accounts-for-token-vault#user-authentication-vs-connected-accounts) を参照してください。                                                                                                                                                                                                                                                                 |
| **Connection name**                            | 接続の論理識別子です。テナント内で一意である必要があります。設定後、この名前は変更できません。                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **OpenID Connect Discovery URL**               | Auth0 が <strong><a href="https://openid.net/specs/openid-connect-discovery-1_0.html">well-known OpenID Connect discovery endpoint</a></strong> を見つけるための URL です。通常は <code>/.well-known/openid-configuration</code> エンドポイントで利用できます。ベース URL または完全な URL を入力できます。その場所で見つかった場合は緑色のチェックマーク、見つからない場合は赤色のマーク、ファイルは見つかったものの設定ファイルに必要な情報が含まれていない場合はエラーメッセージが表示されます。詳細については、[Configure Applications with OIDC Discovery](/ja/docs/get-started/applications/configure-applications-with-oidc-discovery) を参照してください。 |
| **Client ID**                                  | プロバイダーから提供された識別子です。登録したアプリケーションの一意の識別子となります。OIDC IDプロバイダー (IdP) に登録したアプリのクライアントIDとして保存した値を入力します。この手順はプロバイダーごとに異なります。                                                                                                                                                                                                                                                                                                                                                                                  |
| **Communication Channel**                      | <strong>Front Channel</strong> または <strong>Back Channel</strong> を設定します。Front Channel は、<code>response\_mode=form\_post</code> と <code>response\_type=id\_token</code> を使用する OIDC プロトコルを使用します。Back Channel は <code>response\_type=code</code> を使用します。                                                                                                                                                                                                                                                 |
| **Authentication Method**                      | アプリケーションが Auth0 に対して認証する方法を選択します。                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Client Secret**                              | 前の手順で <strong>Back Channel</strong> を選択した場合に使用できます。プロバイダーから提供されるシークレットで、この手順はプロバイダーごとに異なります。                                                                                                                                                                                                                                                                                                                                                                                                          |
| **コールバック URL**                                 | Auth0 が認証後にユーザーをリダイレクトする URL です。この値が、OIDC IDプロバイダー (IdP) に登録したアプリに設定されていることを確認してください。                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Sync user profile attributes at each login** | 選択すると、ユーザーがログインするたびに、テナントは該当する <code>name</code>、<code>nickname</code>、<code>given\_name</code>、<code>family\_name</code>、または <code>picture</code> のルート属性を更新します。                                                                                                                                                                                                                                                                                                                                      |
| **Promote Connection to Domain Level**         | サードパーティアプリケーションがこの接続にアクセスできるようにします。                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

3. **Settings** ビューで、必要に応じて追加の設定を調整します。

| **フィールド**         | **説明**                                                                                                                                                                                                                                       |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **接続名**           | この接続の作成時に指定した名前です。変更はできません。                                                                                                                                                                                                                  |
| **接続メタデータ**       | 前の画面で指定した Well-Known Endpoint URL に基づいて自動生成されますが、新しいメタデータファイルをアップロードして上書きできます。                                                                                                                                                               |
| **認証**            | **Front Channel** または **Back Channel** に設定します。Front Channel は `response_mode=form_post` と `response_type=id_token` を使用する OIDC プロトコルです。Back Channel は `response_type=code` を使用します。更新するには、**Manage Authentication** を選択し、Credentials タブで変更します。 |
| **スコープ**          | IDプロバイダーへの接続時に要求する Auth0 スコープのカンマ区切りのリストです。これはユーザープロファイルに保存されるデータに影響します。少なくとも `openid` スコープを含める必要があります。なお、この接続は `/userinfo` エンドポイントを呼び出さず、ユーザーの claims が `id_token` に含まれていることを前提とします。                                                        |
| **コールバック URL**    | 一部のプロバイダーでは、OIDC 接続を完了するためにこの URL が必要です。                                                                                                                                                                                                     |
| **ユーザーマッピング**     | 特定のユーザー属性を接続変数にマッピングするためのテンプレートを提供します。                                                                                                                                                                                                       |
| **接続プロファイル**      | 接続プロファイルの変更方法については、[Configure PKCE and Claim Mapping for OIDC Connections](/ja/docs/authenticate/identity-providers/enterprise-identity-providers/configure-pkce-claim-mapping-for-oidc) を参照してください。                                          |
| **目的**            | この接続の用途を指定します。ユーザー認証、外部アカウントの Auth0 への接続、またはその両方に使用できます。詳細については、[User authentication vs Connected Accounts](/ja/docs/secure/tokens/token-vault/connected-accounts-for-token-vault#user-authentication-vs-connected-accounts) を参照してください       |
| **グローバルトークン失効**   | 提供されたエンドポイントを使用してリフレッシュトークンを失効させ、ユーザーの Auth0 セッションを終了します。Universal Logout および Okta Workforce Identity Cloud と併用できます。                                                                                                                         |
| **接続をドメインレベルに昇格** | サードパーティアプリケーションがこの接続にアクセスできるようにします。                                                                                                                                                                                                          |

<br />

4. **Provisioning** ビューで、Auth0 でユーザープロファイルをどのように作成および更新するかを設定します。

| **フィールド**                   | **説明**                                                                                                                                                              |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ログインごとにユーザープロファイル属性を同期**  | 有効にすると、Auth0 はユーザーがログインするたびにユーザープロファイルデータを自動的に同期し、接続元で行われた変更が Auth0 に自動的に反映されるようにします。                                                                               |
| **同期頻度**                    | ユーザープロファイルを更新する頻度を指定します。                                                                                                                                            |
| **SCIM を使用してユーザープロファイルを同期** | 有効にすると、Auth0 は SCIM を使用したユーザープロファイルデータの同期を許可します。詳細については、<a href="/ja/docs/authenticate/protocols/scim/configure-inbound-scim">Configure Inbound SCIM</a> を参照してください。 |

5. **Login Experience** ビューで、この接続を使用したユーザーのログイン方法を設定します。

| フィールド        | 説明                                                                                                                                                                            |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ホームレルム検出** | ユーザーのメールアドレスのドメインを、指定した IDプロバイダーのドメインと比較します。詳細については、[Configure Identifier First Authentication](/ja/docs/authenticate/login/auth0-universal-login/identifier-first) を参照してください |
| **接続ボタンを表示** | このオプションでは、アプリケーションの接続ボタンをカスタマイズするための次の選択肢が表示されます。                                                                                                                             |

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  オプションのフィールドは Universal Login でのみ使用できます。Classic Login を使用しているお客様には、Add ボタン、Button display name、Button logo URL は表示されません。
</Callout>

6. **Save Changes** を選択します。

<div id="create-an-enterprise-connection-using-the-management-api">
  ### Management API を使用してエンタープライズ接続を作成する
</div>

以下の例では、Auth0 の <Tooltip tip="Management API: お客様が管理タスクを実行できるようにする製品。" cta="用語集を表示" href="/ja/docs/glossary?term=Management+API">Management API</Tooltip> を使用して接続を作成するさまざまな方法を紹介します。接続は、メタデータ URI を指定するか、OIDC の URL を明示的に設定して構成できます。詳細については、[IDプロバイダー](/ja/docs/authenticate/identity-providers) を参照してください。

<div id="use-front-channel-with-discovery-endpoint">
  #### ディスカバリーエンドポイントでフロントチャネルを利用する
</div>

<AuthCodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://{yourDomain}/api/v2/connections' \
    --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
    --data '{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }'
  ```

  ```csharp C# theme={null}
  var client = new RestClient("https://{yourDomain}/api/v2/connections");
  var request = new RestRequest(Method.POST);
  request.AddHeader("authorization", "Bearer MGMT_API_ACCESS_TOKEN");
  request.AddParameter("undefined", "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"strings"
  	"net/http"
  	"io/ioutil"
  )

  func main() {

  	url := "https://{yourDomain}/api/v2/connections"

  	payload := strings.NewReader("{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }")

  	req, _ := http.NewRequest("POST", url, payload)

  	req.Header.Add("authorization", "Bearer MGMT_API_ACCESS_TOKEN")

  	res, _ := http.DefaultClient.Do(req)

  	defer res.Body.Close()
  	body, _ := ioutil.ReadAll(res.Body)

  	fmt.Println(res)
  	fmt.Println(string(body))

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.post("https://{yourDomain}/api/v2/connections")
    .header("authorization", "Bearer MGMT_API_ACCESS_TOKEN")
    .body("{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }")
    .asString();
  ```

  ```javascript Node.JS theme={null}
  var axios = require("axios").default;

  var options = {
    method: 'POST',
    url: 'https://{yourDomain}/api/v2/connections',
    headers: {authorization: 'Bearer MGMT_API_ACCESS_TOKEN'},
    data: {
      strategy: 'oidc',
      name: 'CONNECTION_NAME',
      options: {
        type: 'front_channel',
        discovery_url: 'https://IDP_DOMAIN/.well-known/openid-configuration',
        client_id: 'IDP_CLIENT_ID',
        scopes: 'openid profile'
      }
    }
  };

  axios.request(options).then(function (response) {
    console.log(response.data);
  }).catch(function (error) {
    console.error(error);
  });
  ```

  ```php PHP theme={null}
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/connections",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }",
    CURLOPT_HTTPHEADER => [
      "authorization: Bearer MGMT_API_ACCESS_TOKEN"
    ],
  ]);

  $response = curl_exec($curl);
  $err = curl_error($curl);

  curl_close($curl);

  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("")

  payload = "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }"

  headers = { 'authorization': "Bearer MGMT_API_ACCESS_TOKEN" }

  conn.request("POST", "/{yourDomain}/api/v2/connections", payload, headers)

  res = conn.getresponse()
  data = res.read()

  print(data.decode("utf-8"))
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'

  url = URI("https://{yourDomain}/api/v2/connections")

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE

  request = Net::HTTP::Post.new(url)
  request["authorization"] = 'Bearer MGMT_API_ACCESS_TOKEN'
  request.body = "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }"

  response = http.request(request)
  puts response.read_body
  ```
</AuthCodeGroup>

<div id="use-back-channel-with-discovery-endpoint">
  #### ディスカバリーエンドポイントでバックチャネルを使用する
</div>

<AuthCodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://{yourDomain}/api/v2/connections' \
    --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
    --data '{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID", "client_secret" : "IDP_CLIENT_SECRET", "scopes": "openid profile" } }'
  ```

  ```csharp C# theme={null}
  var client = new RestClient("https://{yourDomain}/api/v2/connections");
  var request = new RestRequest(Method.POST);
  request.AddHeader("authorization", "Bearer MGMT_API_ACCESS_TOKEN");
  request.AddParameter("undefined", "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID", "client_secret" : "IDP_CLIENT_SECRET", "scopes": "openid profile" } }", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"strings"
  	"net/http"
  	"io/ioutil"
  )

  func main() {

  	url := "https://{yourDomain}/api/v2/connections"

  	payload := strings.NewReader("{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID", "client_secret" : "IDP_CLIENT_SECRET", "scopes": "openid profile" } }")

  	req, _ := http.NewRequest("POST", url, payload)

  	req.Header.Add("authorization", "Bearer MGMT_API_ACCESS_TOKEN")

  	res, _ := http.DefaultClient.Do(req)

  	defer res.Body.Close()
  	body, _ := ioutil.ReadAll(res.Body)

  	fmt.Println(res)
  	fmt.Println(string(body))

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.post("https://{yourDomain}/api/v2/connections")
    .header("authorization", "Bearer MGMT_API_ACCESS_TOKEN")
    .body("{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID", "client_secret" : "IDP_CLIENT_SECRET", "scopes": "openid profile" } }")
    .asString();
  ```

  ```javascript Node.JS theme={null}
  var axios = require("axios").default;

  var options = {
    method: 'POST',
    url: 'https://{yourDomain}/api/v2/connections',
    headers: {authorization: 'Bearer MGMT_API_ACCESS_TOKEN'},
    data: {
      strategy: 'oidc',
      name: 'CONNECTION_NAME',
      options: {
        type: 'back_channel',
        discovery_url: 'https://IDP_DOMAIN/.well-known/openid-configuration',
        client_id: 'IDP_CLIENT_ID',
        client_secret: 'IDP_CLIENT_SECRET',
        scopes: 'openid profile'
      }
    }
  };

  axios.request(options).then(function (response) {
    console.log(response.data);
  }).catch(function (error) {
    console.error(error);
  });
  ```

  ```php PHP theme={null}
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/connections",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID", "client_secret" : "IDP_CLIENT_SECRET", "scopes": "openid profile" } }",
    CURLOPT_HTTPHEADER => [
      "authorization: Bearer MGMT_API_ACCESS_TOKEN"
    ],
  ]);

  $response = curl_exec($curl);
  $err = curl_error($curl);

  curl_close($curl);

  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("")

  payload = "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID", "client_secret" : "IDP_CLIENT_SECRET", "scopes": "openid profile" } }"

  headers = { 'authorization': "Bearer MGMT_API_ACCESS_TOKEN" }

  conn.request("POST", "/{yourDomain}/api/v2/connections", payload, headers)

  res = conn.getresponse()
  data = res.read()

  print(data.decode("utf-8"))
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'

  url = URI("https://{yourDomain}/api/v2/connections")

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE

  request = Net::HTTP::Post.new(url)
  request["authorization"] = 'Bearer MGMT_API_ACCESS_TOKEN'
  request.body = "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID", "client_secret" : "IDP_CLIENT_SECRET", "scopes": "openid profile" } }"

  response = http.request(request)
  puts response.read_body
  ```
</AuthCodeGroup>

<div id="use-back-channel-specifying-issuer-settings">
  #### issuer 設定を指定したバックチャネルを使用する
</div>

<AuthCodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://{yourDomain}/api/v2/connections' \
    --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
    --data '{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "client_secret" : "IDP_CLIENT_SECRET", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }'
  ```

  ```csharp C# theme={null}
  var client = new RestClient("https://{yourDomain}/api/v2/connections");
  var request = new RestRequest(Method.POST);
  request.AddHeader("authorization", "Bearer MGMT_API_ACCESS_TOKEN");
  request.AddParameter("undefined", "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "client_secret" : "IDP_CLIENT_SECRET", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"strings"
  	"net/http"
  	"io/ioutil"
  )

  func main() {

  	url := "https://{yourDomain}/api/v2/connections"

  	payload := strings.NewReader("{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "client_secret" : "IDP_CLIENT_SECRET", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }")

  	req, _ := http.NewRequest("POST", url, payload)

  	req.Header.Add("authorization", "Bearer MGMT_API_ACCESS_TOKEN")

  	res, _ := http.DefaultClient.Do(req)

  	defer res.Body.Close()
  	body, _ := ioutil.ReadAll(res.Body)

  	fmt.Println(res)
  	fmt.Println(string(body))

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.post("https://{yourDomain}/api/v2/connections")
    .header("authorization", "Bearer MGMT_API_ACCESS_TOKEN")
    .body("{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "client_secret" : "IDP_CLIENT_SECRET", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }")
    .asString();
  ```

  ```javascript Node.JS theme={null}
  var axios = require("axios").default;

  var options = {
    method: 'POST',
    url: 'https://{yourDomain}/api/v2/connections',
    headers: {authorization: 'Bearer MGMT_API_ACCESS_TOKEN'},
    data: {
      strategy: 'oidc',
      name: 'CONNECTION_NAME',
      options: {
        type: 'back_channel',
        issuer: 'https://IDP_DOMAIN',
        authorization_endpoint: 'https://IDP_DOMAIN/authorize',
        client_secret: 'IDP_CLIENT_SECRET',
        client_id: 'IDP_CLIENT_ID',
        scopes: 'openid profile'
      }
    }
  };

  axios.request(options).then(function (response) {
    console.log(response.data);
  }).catch(function (error) {
    console.error(error);
  });
  ```

  ```php PHP theme={null}
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/connections",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "client_secret" : "IDP_CLIENT_SECRET", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }",
    CURLOPT_HTTPHEADER => [
      "authorization: Bearer MGMT_API_ACCESS_TOKEN"
    ],
  ]);

  $response = curl_exec($curl);
  $err = curl_error($curl);

  curl_close($curl);

  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("")

  payload = "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "client_secret" : "IDP_CLIENT_SECRET", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }"

  headers = { 'authorization': "Bearer MGMT_API_ACCESS_TOKEN" }

  conn.request("POST", "/{yourDomain}/api/v2/connections", payload, headers)

  res = conn.getresponse()
  data = res.read()

  print(data.decode("utf-8"))
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'

  url = URI("https://{yourDomain}/api/v2/connections")

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE

  request = Net::HTTP::Post.new(url)
  request["authorization"] = 'Bearer MGMT_API_ACCESS_TOKEN'
  request.body = "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "client_secret" : "IDP_CLIENT_SECRET", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }"

  response = http.request(request)
  puts response.read_body
  ```
</AuthCodeGroup>

<div id="use-front-channel-specifying-issuer-settings">
  #### issuer 設定を指定してフロントチャネルを使用する
</div>

<AuthCodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://{yourDomain}/api/v2/connections' \
    --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
    --data '{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "token_endpoint": "https://IDP_DOMAIN/oauth/token", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }'
  ```

  ```csharp C# theme={null}
  var client = new RestClient("https://{yourDomain}/api/v2/connections");
  var request = new RestRequest(Method.POST);
  request.AddHeader("authorization", "Bearer MGMT_API_ACCESS_TOKEN");
  request.AddParameter("undefined", "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "token_endpoint": "https://IDP_DOMAIN/oauth/token", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"strings"
  	"net/http"
  	"io/ioutil"
  )

  func main() {

  	url := "https://{yourDomain}/api/v2/connections"

  	payload := strings.NewReader("{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "token_endpoint": "https://IDP_DOMAIN/oauth/token", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }")

  	req, _ := http.NewRequest("POST", url, payload)

  	req.Header.Add("authorization", "Bearer MGMT_API_ACCESS_TOKEN")

  	res, _ := http.DefaultClient.Do(req)

  	defer res.Body.Close()
  	body, _ := ioutil.ReadAll(res.Body)

  	fmt.Println(res)
  	fmt.Println(string(body))

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.post("https://{yourDomain}/api/v2/connections")
    .header("authorization", "Bearer MGMT_API_ACCESS_TOKEN")
    .body("{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "token_endpoint": "https://IDP_DOMAIN/oauth/token", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }")
    .asString();
  ```

  ```javascript Node.JS theme={null}
  var axios = require("axios").default;

  var options = {
    method: 'POST',
    url: 'https://{yourDomain}/api/v2/connections',
    headers: {authorization: 'Bearer MGMT_API_ACCESS_TOKEN'},
    data: {
      strategy: 'oidc',
      name: 'CONNECTION_NAME',
      options: {
        type: 'front_channel',
        issuer: 'https://IDP_DOMAIN',
        authorization_endpoint: 'https://IDP_DOMAIN/authorize',
        token_endpoint: 'https://IDP_DOMAIN/oauth/token',
        client_id: 'IDP_CLIENT_ID',
        scopes: 'openid profile'
      }
    }
  };

  axios.request(options).then(function (response) {
    console.log(response.data);
  }).catch(function (error) {
    console.error(error);
  });
  ```

  ```php PHP theme={null}
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/connections",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "token_endpoint": "https://IDP_DOMAIN/oauth/token", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }",
    CURLOPT_HTTPHEADER => [
      "authorization: Bearer MGMT_API_ACCESS_TOKEN"
    ],
  ]);

  $response = curl_exec($curl);
  $err = curl_error($curl);

  curl_close($curl);

  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("")

  payload = "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "token_endpoint": "https://IDP_DOMAIN/oauth/token", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }"

  headers = { 'authorization': "Bearer MGMT_API_ACCESS_TOKEN" }

  conn.request("POST", "/{yourDomain}/api/v2/connections", payload, headers)

  res = conn.getresponse()
  data = res.read()

  print(data.decode("utf-8"))
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'

  url = URI("https://{yourDomain}/api/v2/connections")

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE

  request = Net::HTTP::Post.new(url)
  request["authorization"] = 'Bearer MGMT_API_ACCESS_TOKEN'
  request.body = "{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "token_endpoint": "https://IDP_DOMAIN/oauth/token", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }"

  response = http.request(request)
  puts response.read_body
  ```
</AuthCodeGroup>

<div id="configure-pkce-and-claims-mapping">
  ## PKCE とクレーム マッピングを設定する
</div>

このエンタープライズ接続では、Proof Key for Code Exchange (PKCE) に加えて、属性マッピングとトークン マッピングもサポートされています。詳細については、[OIDC 接続の PKCE とクレーム マッピングを設定する](/ja/docs/authenticate/identity-providers/enterprise-identity-providers/configure-pkce-claim-mapping-for-oidc)を参照してください。

<div id="enable-the-enterprise-connection-for-your-auth0-application">
  ## Auth0 アプリケーションでエンタープライズ接続を有効にする
</div>

新しいエンタープライズ接続を使用するには、まず Auth0 アプリケーションで[接続を有効にする](/ja/docs/authenticate/identity-providers/enterprise-identity-providers/enable-enterprise-connections)必要があります。

<div id="test-the-connection">
  ## 接続をテストする
</div>

これで、[接続をテストする](/ja/docs/authenticate/identity-providers/enterprise-identity-providers/test-enterprise-connections)準備ができました。

<div id="manually-configure-issuer-metadata">
  ## 発行者メタデータを手動で設定する
</div>

Issuer URL エンドポイントの **Show Issuer Details** をクリックすると、データを確認し、必要に応じて調整できます。

<div id="federate-with-auth0">
  ## Auth0 とフェデレーションする
</div>

別の Auth0 テナントにフェデレーションする場合は、<Tooltip tip="OpenID: アプリケーションがログイン情報を収集・保存せずに、ユーザーの本人確認を行えるようにする認証のためのオープン標準。" cta="用語集を見る" href="/ja/docs/glossary?term=OpenID">OpenID</Tooltip> Connect エンタープライズ接続が便利です。**Issuer** フィールドに Auth0 テナントの URL (例: `https://<tenant>.us.auth0.com`) を入力し、**Client ID** フィールドにフェデレーション先テナント内の任意のアプリケーションのクライアントIDを入力します。

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  新しいテナントでは、URL に `us` が含まれます。リージョナルドメインが追加される前に作成されたテナントも、引き続き使用できます。たとえば、`https://{YOUR ACCOUNT}.auth0.com` です。
</Callout>

<div id="configure-global-token-revocation">
  ## グローバルトークン失効を設定する
</div>

この接続タイプはグローバルトークン失効エンドポイントをサポートしており、準拠したIDプロバイダーが Auth0 のユーザーセッションを失効させ、<Tooltip tip="リフレッシュトークン: ユーザーに再度ログインさせることなく、新しいアクセストークンを取得するために使用されるトークン。" cta="用語集を見る" href="/ja/docs/glossary?term=refresh+tokens">リフレッシュトークン</Tooltip>を失効させ、セキュアなバックチャネルを使用するアプリケーションのバックチャネルログアウトを開始できるようにします。

この機能は、Okta Workforce Identity の Universal Logout と併用できます。

詳細および設定手順については、[Universal Logout](/ja/docs/authenticate/login/logout/universal-logout) を参照してください。
