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

# Microsoft Dynamics 365

export const CommonDatasourceMoreInformation = ({datasource = "the data source", advancedurl = "", siteName = "CData Sync", driverVersion = ""}) => {
  return <>
      <p>
        {siteName} と{datasource} の連携について、詳しくは{' '}
        <a href={`https://cdn.cdata.com/help/${advancedurl}${driverVersion}/jp/synch/default.htm`}>
          {datasource} Connector for {siteName}
        </a> を参照してください。
      </p>
    </>;
};

export const CommonAuthSchemeAzureserviceprincipalcert = () => {
  return <>
      <p>Azure サービスプリンシパルとクライアント証明書で接続するには、次のプロパティを設定します：</p>
      <ul>
        <li><strong>Auth Scheme：</strong><strong>AzureServicePrincipalCert</strong> を選択。</li>
        <li><strong>Azure Tenant：</strong>接続するMicrosoft Online テナントを入力。</li>
        <li><strong>OAuth Client Id：</strong>OAuth 認証サーバーにアプリケーションを登録した際に割り当てられたクライアントId を入力。</li>
        <li><strong>OAuth JWT Cert：</strong>Java web token（JWT）証明書ストアを入力。</li>
        <li><strong>OAuth JWT Cert Type：</strong>JWT 証明書を格納するキーストアの種類を入力。デフォルトの種類は<strong>PEMKEY_BLOB</strong> です。</li>
        <li>（オプション）<strong>OAuth JWT Cert Password：</strong>OAuth JWT 証明書のパスワードを入力。</li>
        <li>（オプション）<strong>OAuth JWT Cert Subject：</strong>OAuth JWT 証明書のサブジェクトを入力。</li>
      </ul>
      <p>アプリケーションのOAuth 証明書を取得するには：</p>
      <ol>
        <li><a href="https://portal.azure.com" target="_blank" rel="noopener noreferrer">Azure ポータル</a>にログインします。</li>
        <li>左ナビゲーションペインで<strong>すべてのサービス</strong>を選択します。次に<strong>アプリの登録</strong>を検索し選択します。</li>
        <li><strong>新規登録</strong>をクリックします。</li>
        <li>アプリケーションの名前を入力して<strong>任意のAzure AD ディレクトリ - マルチテナント</strong>を選択します。</li>
        <li>アプリケーションを作成したら、<strong>概要</strong>セクションに表示されるアプリケーション (クライアント) ID の値をコピーします。この値をOAuth クライアントId として使用します。</li>
        <li><strong>証明書とシークレット</strong>セクションに移動して、<strong>証明書のアップロード</strong>を選択します。次に、ローカルマシンからアップロードする証明書を選択します。</li>
        <li>有効期間を指定してクライアントシークレットを保存します。保存するとキーの値が表示されます。</li>
        <li>値は一度しか表示されないので、コピーしておきます。この値をOAuth クライアントシークレットとして使用します。</li>
        <li><strong>認証</strong>タブで、必ず<strong>アクセストークン (暗黙的なフローに使用)</strong> を選択します。</li>
      </ol>
    </>;
};

export const CommonAuthSchemeAzureserviceprincipal = () => {
  return <>
      <p>Azure サービスプリンシパルとクライアントシークレットで接続するには、次のプロパティを設定します：</p>
      <ul>
        <li><strong>Auth Scheme：</strong><strong>AzureServicePrincipal</strong> を選択。</li>
        <li><strong>Azure Tenant：</strong>接続するMicrosoft Online テナントを入力。</li>
        <li><strong>OAuth Client Id：</strong>OAuth 認証サーバーにアプリケーションを登録した際に割り当てられたクライアントId を入力。</li>
        <li><strong>OAuth Client Secret：</strong>OAuth 認証サーバーにアプリケーションを登録した際に割り当てられたクライアントシークレットを入力。</li>
      </ul>
      <p>アプリケーションのOAuth クライアントId およびクライアントシークレットを取得するには：</p>
      <ol>
        <li><a href="https://portal.azure.com" target="_blank" rel="noopener noreferrer">Azure ポータル</a>にログインします。</li>
        <li>左ナビゲーションペインで<strong>すべてのサービス</strong>を選択します。次に<strong>アプリの登録</strong>を検索し選択します。</li>
        <li><strong>新規登録</strong>をクリックします。</li>
        <li>アプリケーションの名前を入力して<strong>任意のAzure AD ディレクトリ - マルチテナント</strong>を選択します。</li>
        <li>アプリケーションを作成したら、<strong>概要</strong>セクションに表示されるアプリケーション (クライアント) ID の値をコピーします。この値をOAuth クライアントId として使用します。</li>
        <li><strong>証明書とシークレット</strong>セクションに移動して、アプリケーションの<strong>新しいクライアント シークレット</strong>を選択します。</li>
        <li>有効期間を指定してクライアントシークレットを保存します。保存するとキーの値が表示されます。</li>
        <li>値は一度しか表示されないので、コピーしておきます。この値をOAuth クライアントシークレットとして使用します。</li>
        <li><strong>認証</strong>タブで、必ず<strong>アクセストークン (暗黙的なフローに使用)</strong> を選択します。</li>
      </ol>
    </>;
};

export const CommonAuthSchemeAzuremsi = ({siteName = "CData Sync"}) => {
  return <>
      <p>
        Azure 仮想マシン上で{siteName} が実行されている場合にAzure マネージドサービスID（MSI）を利用するには、<strong>Auth Scheme</strong> で<strong>Azure MSI</strong> を選択します。追加のプロパティは必要ありません。
      </p>
    </>;
};

export const CommonAuthSchemeAzuread = ({siteName = "CData Sync"}) => {
  return <>
      <p>
        Azure Active Directory（AD）ユーザーアカウントで接続するには、<strong>Auth Scheme</strong> で<strong>AzureAD</strong> を選択します。{siteName} は、接続するための組み込みOAuth アプリケーションを提供するため、追加のプロパティは必要ありません。
      </p>
    </>;
};

export const CommonDatasourceAddConnector = ({datasource = "the data source", title = "the connector", destination = false, siteNameShort = "Sync"}) => {
  return <>
      <p>
        {siteNameShort} で{datasource} のデータを使用できるようにするには、まず以下の手順でコネクタを追加する必要があります：
      </p>
      <ol>
        <li>{siteNameShort} のダッシュボードから<strong>接続</strong>ページを開きます。</li>
        <li><strong>接続を追加</strong>をクリックして<strong>コネクタを選択</strong>ページを開きます。</li>
        <li>
          <strong>{destination ? "同期先" : "データソース"}</strong>タブをクリックして
          <strong>{title}</strong> 行に移動します。
        </li>
        <li>
          行末にある<strong>接続を設定</strong>アイコンをクリックして、<strong>新しい接続</strong>ページを開きます。この操作により、{' '}
          <strong>接続を追加</strong>ダイアログボックスが開きます。
          <br />
          <strong>Note：</strong> <strong>接続を設定</strong>アイコンが表示されない場合は、<strong>コネクタをダウンロード</strong>アイコンをクリックして {title} コネクタをインストールしてください。
        </li>
        <li><strong>接続を追加</strong>ダイアログボックスに接続名を入力します。</li>
        <li><strong>追加</strong>をクリックして、コネクタの<strong>設定</strong>タブを開きます。</li>
      </ol>
      <p>
        新しいコネクタのインストールについての詳細は、{' '}
        <a href="../connections">接続</a>を参照してください。
      </p>
    </>;
};

export const CommonDatasourceIntroDestination = ({datasource = "the data source", siteName = "CData Sync"}) => {
  return <p>
      {siteName} アプリケーションから{datasource} コネクタを使用して、サポートされている任意のデータソースから同期先の{datasource} へデータを移動できます。これを行うには、コネクタを追加し、コネクタへの認証を行い、接続を完了する必要があります。
    </p>;
};

export const driverVersion = "M";

export const siteNameShort = "Sync";

export const siteName = "CData Sync";

<CommonDatasourceIntroDestination datasource="Microsoft Dynamics 365" siteName={siteName} />

## Microsoft Dynamics 365 コネクタを追加

<CommonDatasourceAddConnector datasource="Microsoft Dynamics 365" title="Microsoft Dynamics 365" destination={true} siteNameShort={siteNameShort} />

## Microsoft Dynamics 365 への認証

After you add the connector, you need to set the required properties.

**Organizational URL:** Enter the URL to your Microsoft Dynamics 365 organization (for example, [https://abc123.cloudax.dynamics.com](https://abc123.cloudax.dynamics.com)).

{siteName} supports authenticating to Microsoft Dynamics 365 in several ways. Select your authentication method below to proceed to the relevant section that contains the authentication details.

* [**AzureAD**](#azure-active-directory) (default)
* [**AzureMSI**](#azure-managed-service-identity)
* [**AzureServicePrincipal**](#azure-service-principal)
* [**AzureServicePrincipalCert**](#azure-service-principal-certificate)

### Azure Active Directory

<CommonAuthSchemeAzuread siteName={siteName} />

### Azure Managed Service Identity

<CommonAuthSchemeAzuremsi siteName={siteName} />

### Azure Service Principal

<CommonAuthSchemeAzureserviceprincipal siteName={siteName} />

### Azure Service Principal Certificate

<CommonAuthSchemeAzureserviceprincipalcert siteName={siteName} />

## 接続を完了する

To complete your connection:

1. For **Edition**, select the edition for your version of Microsoft Dynamics 365.

   * **CustomerService**
   * **FieldService**
   * **Marketing**
   * **ProjectOperations**
   * **Sales**
   * **Commerce**

   **Note:** The FinOpsOnline, FinOpsOnPremise, and HumanResources editions do not support the Microsoft Dynamics 365 destination.

2. Define advanced connection settings on the **Advanced** tab. (In most cases, though, you should not need these settings.)

3. If you authenticate with AzureAd, click **Connect to Microsoft Dynamics 365** to connect to your Microsoft Dynamics 365 account.

4. Click **Create & Test** to create your connection.

## Create Alternate Keys

Using alternate keys is a key component in a {siteName} reverse ETL workflow, enabling simplification of data integration. Because Microsoft Dynamics 365 stores data in Microsoft Dataverse tables, alternate keys play a crucial role in facilitating data movement between {siteNameShort} and Microsoft Dynamics 365. These keys provide a reliable way to match records when Dataverse globally unique identifiers (GUIDs) are unavailable. Similar to how Salesforce uses an external Id for record identification, alternate keys ensure seamless synchronization and data updates without relying on primary identifiers (Ids).

When you create an alternate key for a Dataverse table, that key is displayed as a column on the **Column Mapping** tab for your reverse ETL job in {siteNameShort}.

To create an alternate key:

1. Sign in to Microsoft Power Apps and navigate to the Dataverse tables.
2. Select the table that you (for example, the **Account** table).This selection opens the table view.
3. In the table view, select **Keys** to open the alternate-keys view.
4. On the **Keys** page, follow these steps:
   1. Click **New Key**, which opens a pop-up dialog box on the right.

   2. In the **Key** dialog box, specify the following information:
      * **Display Name:** Enter a name for this key. This name will be displayed in label is the label that will be displayed in the {siteNameShort} application's ID mapping section.
      * **Columns:** Select a column that you want to use as an alternate key. Note that alternate keys must be unique and they must meet the requirements that are described in the Microsoft Dynamics 365 documentation. If you do not have a column that meets the requirements, you can add a column manually to use.

        **Note:** If you add a new column to use as an external identifier (Id), make sure to backfill it with unique values before you use it to prevent accidental duplicates.

   3. Click **Save** to create your alternate key and to display it on the **Column Mapping** tab for your {siteNameShort} job.
5. Select the name of your alternate key on the **Column Mapping** tab and map it to the appropriate column for your source in {siteNameShort}.

## 詳細について

<CommonDatasourceMoreInformation datasource="Microsoft Dynamics 365" advancedurl="LJ" siteName={siteName} driverVersion={driverVersion} />
