---
schema_version: "1"
id: 3bdbccb663ab9cc01047efe50aa68397e2f11f9c910fa0081e5366b214fa7fea
title: Anypoint Studio を使用した Microsoft Dynamics 365 for Finance and Operations Connector 3.1 の設定
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/microsoft-365-ops-connector/latest/microsoft-365-finance-operations-connector-studio.md
canonical_url: https://docs.mulesoft.com/jp/microsoft-365-ops-connector/latest/microsoft-365-finance-operations-connector-studio
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 699d3e7c54fc6c856dd32ecd5c2363a05baa9fa885239d7e91a9e11bdc7a4cf2
description: MuleSoft Documentation Site
release: "3.1"
latest: true
---
# Anypoint Studio を使用した Microsoft Dynamics 365 for Finance and Operations Connector 3.1 の設定

Anypoint Studio (Studio) エディターは、Mule アプリケーション、プロパティ、および設定ファイルの設計と更新に役立ちます。

Studio でコネクタを追加および設定する手順は、次のとおりです。

1. [Mule プロジェクトを作成します](#create-mule-project)​。
2. [コネクタを Mule プロジェクトに追加します](#add-connector-to-project)​。
3. [コネクタのフローの入力元を設定します](#configure-input-source)​。
4. [フローにコネクタの操作を追加します](#add-connector-operation)​。
5. [コネクタのグローバル要素を設定します](#configure-global-element)​。

Studio で初めてコネクタを設定する場合は、​[「Anypoint Studio を使用したコネクタの設定」](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)​を参照してください。このトピックを参照した後、コネクタ項目についての詳細情報が必要な場合は、​[「Microsoft Dynamics 365 for Finance and Operations リファレンス」](https://docs.mulesoft.com/jp/microsoft-365-ops-connector/latest/microsoft-365-ops-connector-reference)​を参照してください。

## [](#create-mule-project)Mule プロジェクトを作成する

Studio で、コネクタを追加および設定する新しい Mule プロジェクトを作成します。

1. Studio で、​**\[File (ファイル)\] > \[New (新規)\] > \[Mule Project (Mule プロジェクト)\]**​ を選択します。
2. Mule プロジェクトの名前を入力して、​**\[Finish (完了)\]**​ をクリックします。

## [](#add-connector-to-project)コネクタを Mule プロジェクトに追加する

Microsoft Dynamics 365 for Finance and Operations 用コネクタ (Microsoft Dynamics 365 for Operations Connector) を Mule プロジェクトに追加して、XML コードにコネクタの名前空間およびスキーマの場所を自動的に入力し、プロジェクトの ​`pom.xml`​ ファイルに必須の連動関係を追加します。

1. **\[Mule Palette (Mule パレット)\]**​ ビューで、​**\[(X) Search in Exchange ((X) Exchange 内を検索)\]**​ をクリックします。
2. **\[Add Dependencies to Project (連動関係をプロジェクトに追加)\]**​ で、検索項目に「​`dynamics finance`​」と入力します。
3. **\[Available modules (使用可能なモジュール)\]**​ で、そのコネクタ名をクリックします。
4. **\[Add (追加)\]**​ をクリックします。
5. **\[Finish (完了)\]**​ をクリックします。

Studio でコネクタを Mule プロジェクトに追加しても、Studio ワークスペースの他のプロジェクトはそのコネクタを使用できません。

## [](#configure-input-source)ソースの設定

ソースは、指定された条件が満たされたときにフローを開始します。 次のソースのいずれかを Microsoft Dynamics 365 for Operations Connector で使用するように設定できます。

- `HTTP Listener`  
    設定されたホストとポートで要求を受信するたびにフローを開始する
- `Scheduler`\+ 時間ベースの条件が満たされたときにフローを開始する

たとえば、HTTP リスナーを設定する手順は、次のとおりです。

1. **\[Mule Palette (Mule パレット)\]**​ ビューで、​**\[HTTP\] > \[Listener\]**​ を選択します。
2. **\[Listener\]**​ を Studio キャンバスにドラッグします。
3. **\[Listener (リスナー)\]**​ 設定画面で、必要に応じて ​**\[Display Name (表示名)\]**​ 項目の値を変更します。
4. **\[Path (パス)\]**​ 項目の値を指定します。
5. **\[Connector configuration (コネクタ設定)\]**​ 項目の横にあるプラス記号 (+) をクリックして、アプリケーション内の HTTP リスナーのすべてのインスタンスで使用できるグローバル要素を設定します。
6. **\[General (一般)\]**​ タブで、接続情報を指定します。
7. **\[TLS\]**​ タブで、必要に応じて TLS 情報を指定します。
8. **\[Advanced (詳細)\]**​ タブで、必要に応じて再接続戦略を含む再接続情報を指定します。
9. **\[Test Connection (接続をテスト)\]**​ をクリックして、Mule が特定のサーバーに接続できることを確認します。
10. **\[OK\]**​ をクリックします。

## [](#add-connector-operation)フローにコネクタの操作を追加する

フローにコネクタの操作を追加すると、そのコネクタで実行する特定の操作をすぐに定義できます。

Microsoft Dynamics 365 for Operations Connector の操作を追加する手順は、次のとおりです。

1. **\[Mule Palette (Mule パレット)\]**​ ビューで、​**\[Dynamics 365 for Operations\]**​ を選択し、目的の操作を選択します。
2. その操作を Studio キャンバスの入力元の右にドラッグします。

## [](#configure-global-element)コネクタのグローバル要素を設定する

コネクタを設定する場合、アプリケーション内のそのコネクタのすべてのインスタンスで使用できるグローバル要素を設定することをお勧めします。グローバル要素を設定するには、コネクタが対象 Microsoft Dynamics 365 システムにアクセスするための認証ログイン情報を提供する必要があります。Microsoft Dynamics 365 for Operations Connector では、OAuth 2.0 認証がサポートされています。

Microsoft Dynamics 365 for Operations Connector のグローバル要素を設定する手順は、次のとおりです。

1. Studio キャンバスでコネクタの名前を選択します。
2. 操作の設定画面で、​**\[Connector configuration (コネクタ設定)\]**​ 項目の横にあるプラス記号 (​**+**​) をクリックし、グローバル要素設定項目にアクセスします。
3. **\[General (一般)\]**​ タブの ​**\[Connection (接続)\]**​ で、設定する認証方式を選択します。
    
    - [**OAuth Client Credentials (OAuth クライアントログイン情報)**](#oauth-client-credentials)
    - [**OAuth 2.0**](#oauth-2.0)
        
        ANT スタイルのプロパティプレースホルダーを含む設定ファイルを参照するか (推奨)、グローバル設定プロパティに認証ログイン情報を入力できます。プロパティプレースホルダーを使用する利点とその設定方法については、​[「Anypoint Connector 設定」](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview)​を参照してください。
4. **\[Advanced (詳細)\]**​ タブで、必要に応じて再接続戦略を含む再接続情報を指定します。
5. **\[Test Connection (接続をテスト)\]**​ をクリックして、Mule が指定されたサーバーに接続できることを確認します。
6. **\[OK\]**​ をクリックします。

### [](#oauth-client-credentials)OAuth Client Credentials (OAuth クライアントログイン情報)

**\[Global Element Properties (グローバル要素のプロパティ)\]**​ 画面の ​**\[General (一般)\]**​ タブに次の必須情報を入力して、​**\[OAuth Client Credentials (OAuth クライアントログイン情報)\]**​ 認証を設定します。

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 30%;">
<col style="width: 70%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">項目</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Resource (リソース)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Web API のアプリケーション ID URI</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Client Id (クライアント ID)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>サービスプロバイダーに登録されている OAuth クライアント ID</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Client Secret (クライアントシークレット)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>サービスプロバイダーに登録されている OAuth クライアントシークレット</p>
</div></div></td>
</tr>
</tbody>
</table>

### [](#oauth-2.0)OAuth 2.0

Unresolved include directive in modules/ROOT/pages/microsoft-365-finance-operations-connector-studio.adoc - include::connectors::partial$oauth2-description.adoc\[\]

**\[Global Element Properties (グローバル要素のプロパティ)\]**​ 画面の ​**\[General (一般)\]**​ タブで次の情報を入力し、​**\[OAuth 2.0\]**​ 認証を設定します。

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 30%;">
<col style="width: 70%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">項目</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Resource (リソース)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>OAuth エンドポイント URL。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Consumer Key (コンシューマーキー)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>アプリケーションを Azure Active Directory に登録したときに割り当てられたアプリケーション ID。この ID は Azure Portal (portal.azure.com) で確認できます。​<strong>[Active Directory]</strong>​ をクリックして、ディレクトリをクリックし、アプリケーションを選択してから ​<strong>[Configure (設定)]</strong>​ をクリックします。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Consumer Secret (コンシューマーシークレット)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>アプリケーション登録ポータルでアプリケーション用に作成したシークレット。クライアントシークレットは信頼のおける方法でデバイスに保存できないためネイティブアプリケーションで使用しないでください。クライアントシークレットは Web アプリケーションと Web API で必要です (クライアントシークレットをサーバー側で安全に保存できます)。この ID は Azure Portal (portal.azure.com) で確認できます。クライアントシークレットは、アプリケーションと Azure サーバーのみに公開されている数値であり、これによりアプリケーションにアクセスできます。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Authorization URL (認証 URL)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>テナント固有の OAuth2.0 エンドポイント。​<code>https://login.microsoftonline.com/{tenant}/oauth2/authorize</code>​ の形式です (エンドポイントの具体的な情報の取得方法については、以前のリンク先に記載されている手順に従ってください)。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Access token URL (アクセストークン URL)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>アクセストークンを要求するためのテナント固有のエンドポイント。​<code>https://login.microsoftonline.com/{tenant}/oauth2/token</code>​ の形式です (エンドポイントの具体的な情報の取得方法については、以前のリンク先に記載されている手順に従ってください)。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Listener config (リスナー設定)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Anypoint Studio のフローで作成された HTTP リスナーインスタンスの名前。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Callback path (コールバックパス)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>アプリケーションが認証応答の送受信に使用できる URL。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Authorize path (認証パス)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>OAuth メカニズムをトリガーする URL。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>External callback URL (外部コールバック URL)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>コールバック URL に直接アクセスできない場合 (例: プロキシを使用する場合) にのみ必須。コールバックパスでは、​<code>http://localhost:8081/callback</code>​ の形式を使用します。</p>
</div></div></td>
</tr>
</tbody>
</table>

\+ image::microsoft-365-ops-as-oauth2.png\["Microsoft Dynamics for Finance and Operations Connector の OAuth 2.0 設定項目"\]

## [](#関連情報)関連情報

- [Anypoint Connector の概要](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Anypoint Studio を使用したコネクタの設定](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)
- [Microsoft Dynamics 365 for Finance and Operations Connector リファレンス](https://docs.mulesoft.com/jp/microsoft-365-ops-connector/latest/microsoft-365-ops-connector-reference)
- [MuleSoft ヘルプセンター](https://help.mulesoft.com)