> ## 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.

# Auth0

> Auth0フローのアクションを構成して、ユーザープロファイル情報の取得や更新と、新しいユーザーの作成を行う方法について説明します。

このリストにあるAuth0アクションは、ユーザーの取得、作成、更新を行えるようにします。

## Vault接続を構成する

Auth0のアクションにVault接続を構成するには、[マシンツーマシン](/docs/ja-jp/get-started/auth0-overview/create-applications/machine-to-machine-apps)アプリケーションを作成して、 **テナントドメイン、クライアントIDおよびクライアントシークレット** を使用する必要があります：

<Frame>
  <img src="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/1FU_hDyg-ytA7ilg/docs/images/ja-jp/cdy7uua7fh8z/1IPtH5hD6QTRXsySyo2Ovr/3562828624e2fd4f308b6eb3b5042f34/auth0-vault-connection.png?fit=max&auto=format&n=1FU_hDyg-ytA7ilg&q=85&s=35b9fa259f0f0390812eea2fe64fac25" alt="" width="1404" height="851" data-path="docs/images/ja-jp/cdy7uua7fh8z/1IPtH5hD6QTRXsySyo2Ovr/3562828624e2fd4f308b6eb3b5042f34/auth0-vault-connection.png" />
</Frame>

<Warning>
  マシンツーマシンアプリケーションには必ずManagement APIへのアクセスを認可して、正しいスコープ（`update:users_app_metadata`など）を選択してください。
</Warning>

## ユーザーの作成

ユーザーを作成します。

<Frame>
  <img src="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/V-g8sIA_dMysRiDH/docs/images/ja-jp/cdy7uua7fh8z/6MQIKf2IpTtI2g7d5Pwn7u/222ec746cf9c0c1003d18ba4c0aa451e/create_user.png?fit=max&auto=format&n=V-g8sIA_dMysRiDH&q=85&s=13e8a8968b842bf1fcd0cad464185807" alt="" width="1392" height="1094" data-path="docs/images/ja-jp/cdy7uua7fh8z/6MQIKf2IpTtI2g7d5Pwn7u/222ec746cf9c0c1003d18ba4c0aa451e/create_user.png" />
</Frame>

### 入力設定

| パラメーター | 説明                                                                                                                              |
| ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| ボディー   | 追加するAuth0ユーザープロパティのペイロードです。詳細については、[ユーザー作成](https://auth0.com/docs/ja-jp/api/management/v2/users/post-users)APIのドキュメントをお読みください。 |

### 出力設定

期待される応答とステータスコードは、APIドキュメントの「[ユーザーの作成](https://auth0.com/docs/api/management/v2/users/post-users#response-messages)」に記載されています。

## ユーザーの取得

ユーザーの詳細情報を取得します。

<Frame>
  <img src="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/itywf6vBRFUC2Nea/docs/images/ja-jp/cdy7uua7fh8z/3GoNZsXOvMTYRtMQNj00mm/6e92d94cee7b165479c688358a5df242/Screenshot_2024-11-18_at_16.31.49.png?fit=max&auto=format&n=itywf6vBRFUC2Nea&q=85&s=feba980434cd1db2589db07bac12f048" alt="" width="1404" height="650" data-path="docs/images/ja-jp/cdy7uua7fh8z/3GoNZsXOvMTYRtMQNj00mm/6e92d94cee7b165479c688358a5df242/Screenshot_2024-11-18_at_16.31.49.png" />
</Frame>

### 入力設定

| パラメーター | 説明                                                  |
| ------ | --------------------------------------------------- |
| ユーザーID | 取得するユーザーのIDです。詳細については、[ユーザー取得]()APIのドキュメントをお読みください。 |

### 出力設定

期待される応答とステータスコードは、APIドキュメントの「[ユーザーの取得](https://auth0.com/docs/api/management/v2/users/get-users-by-id#response-messages)」に記載されています。

## ユーザーの更新

ユーザーを更新します。

<Frame>
  <img src="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/f9tcsxrYvRYBs4lY/docs/images/ja-jp/cdy7uua7fh8z/3tymSpaeod6EksWRJp1sge/1122b244d756d754fe41baac209a132b/Screenshot_2024-11-18_at_16.49.56.png?fit=max&auto=format&n=f9tcsxrYvRYBs4lY&q=85&s=5cf5a33d7fee17573c392202aa91342c" alt="" width="1404" height="1213" data-path="docs/images/ja-jp/cdy7uua7fh8z/3tymSpaeod6EksWRJp1sge/1122b244d756d754fe41baac209a132b/Screenshot_2024-11-18_at_16.49.56.png" />
</Frame>

### 入力設定

| パラメーター | 説明                                                                                                                                     |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| ユーザーID | 更新するユーザーのIDです。                                                                                                                         |
| ボディー   | 更新するAuth0ユーザープロパティのペイロードです。詳細については、[ユーザー更新](https://auth0.com/docs/ja-jp/api/management/v2/users/patch-users-by-id)APIのドキュメントをお読みください。 |

### 出力設定

期待される応答とステータスコードは、APIドキュメントの「[ユーザーの更新](https://auth0.com/docs/api/management/v2/users/patch-users-by-id#response-messages)」に記載されています。

## カスタムAPI要求

Auth0 APIのエンドポイントにカスタムAPI要求を送信します。

<Frame>
  <img src="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/V-g8sIA_dMysRiDH/docs/images/ja-jp/cdy7uua7fh8z/66uV9iuhwfnXUdE1quLOyx/2ae3ff26335acbcd172cbb40618a5a90/Screenshot_2025-01-24_at_18.50.26.png?fit=max&auto=format&n=V-g8sIA_dMysRiDH&q=85&s=4cd210d4c77d62f7fe318e37a2cd912a" alt="Dashboard > Customize > Flows > Integrations > Auth0" data-og-width="1211" width="1211" data-og-height="862" height="862" data-path="docs/images/ja-jp/cdy7uua7fh8z/66uV9iuhwfnXUdE1quLOyx/2ae3ff26335acbcd172cbb40618a5a90/Screenshot_2025-01-24_at_18.50.26.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/V-g8sIA_dMysRiDH/docs/images/ja-jp/cdy7uua7fh8z/66uV9iuhwfnXUdE1quLOyx/2ae3ff26335acbcd172cbb40618a5a90/Screenshot_2025-01-24_at_18.50.26.png?w=280&fit=max&auto=format&n=V-g8sIA_dMysRiDH&q=85&s=31af8c8342176091caec4d0ac1e50c4a 280w, https://mintcdn.com/docs-dev-docs-event-stream-action-templates/V-g8sIA_dMysRiDH/docs/images/ja-jp/cdy7uua7fh8z/66uV9iuhwfnXUdE1quLOyx/2ae3ff26335acbcd172cbb40618a5a90/Screenshot_2025-01-24_at_18.50.26.png?w=560&fit=max&auto=format&n=V-g8sIA_dMysRiDH&q=85&s=40d3bf4b86c2592fd0d91723d271a8ad 560w, https://mintcdn.com/docs-dev-docs-event-stream-action-templates/V-g8sIA_dMysRiDH/docs/images/ja-jp/cdy7uua7fh8z/66uV9iuhwfnXUdE1quLOyx/2ae3ff26335acbcd172cbb40618a5a90/Screenshot_2025-01-24_at_18.50.26.png?w=840&fit=max&auto=format&n=V-g8sIA_dMysRiDH&q=85&s=3526f1aaa145fc94b50b1094d9386739 840w, https://mintcdn.com/docs-dev-docs-event-stream-action-templates/V-g8sIA_dMysRiDH/docs/images/ja-jp/cdy7uua7fh8z/66uV9iuhwfnXUdE1quLOyx/2ae3ff26335acbcd172cbb40618a5a90/Screenshot_2025-01-24_at_18.50.26.png?w=1100&fit=max&auto=format&n=V-g8sIA_dMysRiDH&q=85&s=38d672b5d8fb93bad1ac05106acad6b7 1100w, https://mintcdn.com/docs-dev-docs-event-stream-action-templates/V-g8sIA_dMysRiDH/docs/images/ja-jp/cdy7uua7fh8z/66uV9iuhwfnXUdE1quLOyx/2ae3ff26335acbcd172cbb40618a5a90/Screenshot_2025-01-24_at_18.50.26.png?w=1650&fit=max&auto=format&n=V-g8sIA_dMysRiDH&q=85&s=6a354dd9a893745a5fd82c093b562c5e 1650w, https://mintcdn.com/docs-dev-docs-event-stream-action-templates/V-g8sIA_dMysRiDH/docs/images/ja-jp/cdy7uua7fh8z/66uV9iuhwfnXUdE1quLOyx/2ae3ff26335acbcd172cbb40618a5a90/Screenshot_2025-01-24_at_18.50.26.png?w=2500&fit=max&auto=format&n=V-g8sIA_dMysRiDH&q=85&s=07e0e5e6436d7c758be23812ee718126 2500w" />
</Frame>

### 入力設定

| Parameter  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Path       | The API endpoint absolute pathname.<br />( Example: `/api/v2/organizations` )<br />**Note:** Some endpoints, for example: [ Get a user ](https://auth0.com/docs/api/management/v2/users/get-users-by-id), require URI encoded parameters when not using alphanumeric characters, such as: `-`, `.`, `_`, or `~`, [ characters ](https://datatracker.ietf.org/doc/html/rfc3986#section-2.3)).<br />To do this, you can use the encodeURIComponent function:<br />`{{ functions.encodeURIComponent(context.user.user_id) }} ` |
| Method     | Available HTTP methods include: <ul> <li>`GET`</li> <li>`POST`</li> <li>`PUT`</li> <li>`PATCH`</li> <li>`DELETE`</li> </ul>                                                                                                                                                                                                                                                                                                                                                                                                 |
| Body       | The body of the request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Headers    | The headers of the request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| URL Params | The URL parameters. These parameters are automatically URL-encoded.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

### 出力設定

期待される応答とステータスコードは、Auth0 <Tooltip data-tooltip-id="react-containers-DefinitionTooltip-0" href="/docs/ja-jp/glossary?term=management-api" tip="Management API: 顧客が管理タスクを実行できるようにするための製品。" cta="用語集の表示">Management API</Tooltip>のドキュメントに記載されています。
