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

# Resource Parameter Compatibility Profileを有効にする

> Auth0でリソースパラメーターを有効にする方法について説明します。

Model Context Protocol (MCP) の仕様では、[RFC 8707](https://www.rfc-editor.org/rfc/rfc8707.html)で定義された標準準拠の`resource`パラメーターを使用することが求められています。一方、Auth0の認証APIでは従来、対象となるリソースサーバー (API) の指定に`audience`パラメーターを使用してきました。このドキュメントでは、新しい`resource`パラメーターの概要と、新しい互換性プロファイルを有効にする手順について説明します。

## Resource Parameter Compatibility Profile を有効にする

To use the `resource` parameter in your access tokens and the `iss` claim to identify your authorization server, you need to enable two toggles in the [Auth0 Dashboard](https://manage.auth0.com/dashboard/):

1. Navigate to **Settings** on the left sidebar.
2. Select [**Advanced**](https://manage.auth0.com/dashboard/#/tenant/advanced) in the top right corner.
3. Scroll down to the **Settings** section and enable the following toggles:
   * **Resource Parameter Compatibility Profile**: Enables support for the `resource` parameter in authorization requests, allowing access tokens to be scoped to a specific API.
   * **Include Issuer in Authorization Responses**: Includes the `iss` parameter identifying the authorization server in authorization responses, helping clients defend against mix-up attacks.

## 仕組み

**Resource Parameter Compatibility Profile**が無効の場合、動作は従来どおりで、Auth0のアクセストークンには`audience`パラメーターのみが使用されます。

![アクセストークン内のオーディエンス](https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/ai/mcp/audience_parameter_at_diagram_light.png)

**Resource Parameter Compatibility Profile**を有効にすると、Auth0は`resource`パラメーターがあればそれを使用して、トークンのオーディエンスを定義します。

![アクセストークン内のリソース](https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/ai/mcp/resource_parameter_at_diagram_light.png)

`resource`と`audience`の両方が指定されている場合は、引き続き`audience`が使用されます。Auth0は`resource`をアップストリームのIDプロバイダー (IdP) には転送しません。[詳細はこちら](/ai/docs/ja-jp/mcp/guides/resource-param-compatibility-profile.md#resource-parameter-forwarding-to-upstream-identity-provider-idp)。

*RFC 8707では、`resource`パラメーターは[絶対URIである](https://www.rfc-editor.org/rfc/rfc8707.html#name-resource-parameter)必要があります。RFC 8707に準拠するために、リソースサーバーの識別子 (API識別子) は[URI形式](https://datatracker.ietf.org/doc/html/rfc3986)で定義することをお勧めします。なお、MCPサーバーの識別子に絶対URIを使用することは、MCP認可仕様でも必須とされています。*

## サポートされているフロー

`resource` パラメーターは、次のフローでサポートされています。

* 標準の認可フロー (`/authorize`)
* プッシュ型認可リクエスト (PAR)
* JWTで保護された認可リクエスト (JAR)
* クライアント起点のバックチャネル認証 (CIBA)
* リフレッシュトークン付与タイプ

## アップストリームのIDプロバイダー (IdP) へのリソースパラメーターの転送

アップストリームのIdPにフェデレーションする際、Auth0では、開始元のクライアントが[パラメーターを転送](https://auth0.com/docs/authenticate/identity-providers/pass-parameters-to-idps.md)できる仕組みを提供しています。ドキュメントに記載のとおり、`resource`は[アップストリームのIdPに転送可能な](https://auth0.com/docs/authenticate/identity-providers/pass-parameters-to-idps.md#available-fields)パラメーターの1つです。

RFC 8707では、`resource`パラメーターに絶対URIを指定するよう求められています。RFC 8707に準拠するため、リソースサーバーの識別子 (APIの識別子) はURI形式で定義することをお勧めします。アクセストークンの詳細が漏洩するのを防ぐため、Resource Parameter Compatibility Profileが有効な場合、Auth0はリソースパラメーターをアップストリームのIdPに転送しません。

* Resource Parameter Compatibilityが**無効** (デフォルトの動作) の場合：
  * `resource`をアップストリームのIdPのパラメーターとして使用できます。
* Resource Parameter Compatibilityが**有効**の場合：

  * `resource`はアップストリームのIdPのパラメーターとして使用できず、転送もされません。

  > [!NOTE]
  >
  > リソースパラメーターをアップストリームのIdPに渡す場合は、Resource Parameter Compatibility Profileを有効にしないでください。
