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

# Azure Communication Services をメールプロバイダーとして設定する

> Auth0 で Azure Communication Services をメールプロバイダーとして設定する手順。

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

* [Microsoft Azure](https://azure.microsoft.com/en-us) のアカウントが必要です。

* プロバイダー側で、特定の [Auth0 IP addresses](/docs/ja-jp/secure/security-guidance/data-security/allowlist) からの受信接続を許可するよう設定する必要があります。

<div id="configure-azure-communication-services">
  ## Azure Communication Services を設定する
</div>

まず、Microsoft Azure でリソースを作成します。

1. [Microsoft Azure](https://azure.microsoft.com/en-us) アカウントにログインします。
2. 検索バーに「Communication Services」と入力します。
3. まだリソースがない場合は、[Communication Services](https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/create-communication-resource) リソースを作成します。
4. **Create** を選択します。
5. **Tools** の **設定** で **Keys** を選択します。[Communication Services の接続文字列](https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/create-communication-resource)を取得します。
6. **Primary Key** で、**接続文字列** の値をコピーします。
   有効な接続文字列は、`endpoint=COMMUNICATION_SERVICES_URL;accesskey=ACCESS_KEY` という形式です。

次に、Auth0 でメールプロバイダーを設定します。

1. [Auth0 Dashboard > Branding > Email Provider](https://manage.auth0.com/#/branding/email_provider) に移動します。

2. **Use my own email provider** を選択します。

3. **Azure Communication Services** を選択します。

4. **From** にメールアドレスを入力します。

   <Warning>
     Azure Communications Services では、**From** フィールドに指定できるのは生のメールアドレス (`user@example.com`) のみです。
   </Warning>

5. Azure Communication Services の **接続文字列** を追加します。

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

<div id="send-a-test-email">
  ## テストメールを送信する
</div>

**Send Test Email** ボタンを使用して、テストメールを送信します。設定が正しければ、確認メールが届きます。数分待ってもメールが届かない場合は、エラーコードが記録されていないか [Auth0ログ](https://manage.auth0.com/#/logs) を確認してください。

設定が完了すると、Communication Services の [Metrics Monitor](https://learn.microsoft.com/en-us/azure/communication-services/concepts/metrics#chat-api-request-metric-operations) ページに、ユーザーに送信されたすべてのメールの配信状況に関する分析情報が表示されます。
