次の方法で共有


Microsoft Entra スキーマについて

Microsoft Entra ID におけるオブジェクトは、他のディレクトリと同様に、ユーザー、グループ、連絡先などを表す、プログラムによる高次データ構造体です。 Microsoft Entra ID に新しいユーザーや連絡先を作成すると、それはオブジェクトの新しいインスタンスとして作成されます。 これらのインスタンスは、プロパティに基づいて区別できます。

Microsoft Entra ID におけるプロパティは、オブジェクトのインスタンスに関する情報を保持する要素です。

Microsoft Entra スキーマでは、エントリでプロパティを使用するルール、それらのプロパティが持つことができる値の種類、およびユーザーがこれらの値を操作する方法を定義します。

Microsoft Entra ID には 2 種類のプロパティがあります。

  • 組み込みプロパティ: Microsoft Entra スキーマで事前に定義されているプロパティです。 これらのプロパティにはさまざまな用途があり、アクセスできる場合とできない場合があります。
  • ディレクトリ拡張: 独自に Microsoft Entra ID をカスタマイズするために提供されているプロパティです。 たとえば、特定の属性を持つオンプレミスの Active Directory を拡張し、その属性をフローさせる場合は、提供されているカスタム プロパティの 1 つを使用できます。

各クラウド同期の構成には同期スキーマが含まれます。 この同期スキーマは、どのオブジェクトを同期するか、どのように同期するかを定義します。

属性と式

たとえば、ユーザーのようなオブジェクトが Microsoft Entra ID にプロビジョニングされると、ユーザー オブジェクトの新しいインスタンスが作成されます。 この作成物には、そのオブジェクトのプロパティが含まれています。これは属性とも呼ばれます。 初期状態では、新しく作成されたオブジェクトの属性は、同期規則によって決定される値に設定されます。 これらの属性は、クラウド プロビジョニング エージェントを使用して最新の状態に保たれます。

オブジェクトのプロビジョニング

たとえば、ユーザーがマーケティング部門に属しているとします。 最初に、プロビジョニング時に Microsoft Entra の部門属性が作成され、値が Marketing に設定されます。 6 か月後に販売に異動した場合、オンプレミスの Active Directory の部門属性が Sales に変更されます。 この変更は Microsoft Entra ID に同期され、そのユーザー オブジェクトに反映されます。

属性の同期は、直接行うことができます。この場合、Microsoft Entra ID の値は、オンプレミスの属性の値に直接設定されます。 または、プログラム式によって同期が処理される場合があります。 値を設定するために何らかのロジックを要するか、または決定を行う必要がある場合は、プログラム式が必要になります。

たとえば、メールの属性が "john.smith@contoso.com" であり、"@contoso.com" の部分を取り除いて値 "john. smith" だけをフローさせる必要がある場合は、次のコードを使用します。

Replace([mail], "@contoso.com", , ,"", ,)

サンプル入力/出力:

  • 入力 (mail): "john.smith@contoso.com"
  • 出力: "john. smith"

カスタム式および構文の記述方法の詳細については、「Microsoft Entra ID での属性マッピングのための式の作成」を参照してください。

次の表では、一般的な属性と、それらがどのように Microsoft Entra ID に同期されるかを示しています。

オンプレミスの Active Directory マッピングの種類 マイクロソフト エントラ ID
cn 直接 commonName
countryCode 直接 countryCode
displayName 直接 displayName
givenName givenName
objectGUID(オブジェクトGUID) 直接 sourceAnchorBinary
userPrincipalName 直接 userPrincipalName
プロキシアドレス 直接 プロキシアドレス

同期スキーマを表示する

警告

クラウド同期構成ではサービス プリンシパルが作成されます。 サービス プリンシパルは Microsoft Entra 管理センターで表示されます。 Microsoft Entra 管理センターのサービス プリンシパルの画面では、属性マッピングを変更しないでください。 これはサポートされていません。

クラウド同期構成の同期スキーマを表示して確認するには、以下の手順に従います。

  1. Graph エクスプローラーに移動します。

  2. 自分のグローバル管理者アカウントでサインインします。

  3. 左側で、 [アクセス許可の変更] を選択し、Directory.ReadWrite.All同意になっていることを確認します。

  4. クエリ https://graph.microsoft.com/beta/serviceprincipals/?$filter=startswith(DisplayName, ‘{sync config name}’) を実行します。 このクエリでは、サービス プリンシパルのフィルター処理された一覧が返されます。 この一覧は Microsoft Entra ID の [アプリの登録] ノードからも確認できます。

  5. "appDisplayName": "Active Directory to Azure Active Directory Provisioning" を見つけて、"id" の値を書き留めます。

    "value": [
            {
                "id": "00d41b14-7958-45ad-9d75-d52fa29e02a1",
                "deletedDateTime": null,
                "accountEnabled": true,
                "appDisplayName": "Active Directory to Azure Active Directory Provisioning",
                "appId": "00001111-aaaa-2222-bbbb-3333cccc4444",
                "applicationTemplateId": null,
                "appOwnerOrganizationId": "00aa00aa-bb11-cc22-dd33-44ee44ee44ee",
                "appRoleAssignmentRequired": false,
                "displayName": "Active Directory to Azure Active Directory Provisioning",
                "errorUrl": null,
                "homepage": "https://account.activedirectory.windowsazure.com:444/applications/default.aspx?metadata=AD2AADProvisioning|ISV9.1|primary|z",
                "loginUrl": null,
                "logoutUrl": null,
                "notificationEmailAddresses": [],
                "preferredSingleSignOnMode": null,
                "preferredTokenSigningKeyEndDateTime": null,
                "preferredTokenSigningKeyThumbprint": null,
                "publisherName": "Active Directory Application Registry",
                "replyUrls": [],
                "samlMetadataUrl": null,
                "samlSingleSignOnSettings": null,
                "servicePrincipalNames": [
                    "http://adapplicationregistry.onmicrosoft.com/adprovisioningtoaad/primary",
                    "1a4721b3-e57f-4451-ae87-ef078703ec94"
                ],
                "signInAudience": "AzureADMultipleOrgs",
                "tags": [
                    "WindowsAzureActiveDirectoryIntegratedApp"
                ],
                "addIns": [],
                "api": {
                    "resourceSpecificApplicationPermissions": []
                },
                "appRoles": [
                    {
                        "allowedMemberTypes": [
                            "User"
                        ],
                        "description": "msiam_access",
                        "displayName": "msiam_access",
                        "id": "a0326856-1f51-4311-8ae7-a034d168eedf",
                        "isEnabled": true,
                        "origin": "Application",
                        "value": null
                    }
                ],
                "info": {
                    "termsOfServiceUrl": null,
                    "supportUrl": null,
                    "privacyStatementUrl": null,
                    "marketingUrl": null,
                    "logoUrl": null
                },
                "keyCredentials": [],
                "publishedPermissionScopes": [
                    {
                        "adminConsentDescription": "Allow the application to access Active Directory to Azure Active Directory Provisioning on behalf of the signed-in user.",
                        "adminConsentDisplayName": "Access Active Directory to Azure Active Directory Provisioning",
                        "id": "d40ed463-646c-4efe-bb3e-3fa7d0006688",
                        "isEnabled": true,
                        "type": "User",
                        "userConsentDescription": "Allow the application to access Active Directory to Azure Active Directory Provisioning on your behalf.",
                        "userConsentDisplayName": "Access Active Directory to Azure Active Directory Provisioning",
                        "value": "user_impersonation"
                    }
                ],
                "passwordCredentials": []
            },
    
  6. {Service Principal id} を独自の値に置き換え、クエリ https://graph.microsoft.com/beta/serviceprincipals/{Service Principal id}/synchronization/jobs/ を実行します。

  7. "id": "AD2AADProvisioning.fd1c9b9e8077402c8bc03a7186c8f976" を見つけて、"id" の値を書き留めます。

    {
                "id": "AD2AADProvisioning.fd1c9b9e8077402c8bc03a7186c8f976",
                "templateId": "AD2AADProvisioning",
                "schedule": {
                    "expiration": null,
                    "interval": "PT2M",
                    "state": "Active"
                },
                "status": {
                    "countSuccessiveCompleteFailures": 0,
                    "escrowsPruned": false,
                    "code": "Active",
                    "lastSuccessfulExecutionWithExports": null,
                    "quarantine": null,
                    "steadyStateFirstAchievedTime": "2019-11-08T15:48:05.7360238Z",
                    "steadyStateLastAchievedTime": "2019-11-20T16:17:24.7957721Z",
                    "troubleshootingUrl": "",
                    "lastExecution": {
                        "activityIdentifier": "2dea06a7-2960-420d-931e-f6c807ebda24",
                        "countEntitled": 0,
                        "countEntitledForProvisioning": 0,
                        "countEscrowed": 15,
                        "countEscrowedRaw": 15,
                        "countExported": 0,
                        "countExports": 0,
                        "countImported": 0,
                        "countImportedDeltas": 0,
                        "countImportedReferenceDeltas": 0,
                        "state": "Succeeded",
                        "error": null,
                        "timeBegan": "2019-11-20T16:15:21.116098Z",
                        "timeEnded": "2019-11-20T16:17:24.7488681Z"
                    },
                    "lastSuccessfulExecution": {
                        "activityIdentifier": null,
                        "countEntitled": 0,
                        "countEntitledForProvisioning": 0,
                        "countEscrowed": 0,
                        "countEscrowedRaw": 0,
                        "countExported": 5,
                        "countExports": 0,
                        "countImported": 0,
                        "countImportedDeltas": 0,
                        "countImportedReferenceDeltas": 0,
                        "state": "Succeeded",
                        "error": null,
                        "timeBegan": "0001-01-01T00:00:00Z",
                        "timeEnded": "2019-11-20T14:09:46.8855027Z"
                    },
                    "progress": [],
                    "synchronizedEntryCountByType": [
                        {
                            "key": "group to Group",
                            "value": 33
                        },
                        {
                            "key": "user to User",
                            "value": 3
                        }
                    ]
                },
                "synchronizationJobSettings": [
                    {
                        "name": "Domain",
                        "value": "{\"DomainFQDN\":\"contoso.com\",\"DomainNetBios\":\"CONTOSO\",\"ForestFQDN\":\"contoso.com\",\"ForestNetBios\":\"CONTOSO\"}"
                    },
                    {
                        "name": "DomainFQDN",
                        "value": "contoso.com"
                    },
                    {
                        "name": "DomainNetBios",
                        "value": "CONTOSO"
                    },
                    {
                        "name": "ForestFQDN",
                        "value": "contoso.com"
                    },
                    {
                        "name": "ForestNetBios",
                        "value": "CONTOSO"
                    },
                    {
                        "name": "QuarantineTooManyDeletesThreshold",
                        "value": "500"
                    }
                ]
            }
    
  8. ここで、クエリ https://graph.microsoft.com/beta/serviceprincipals/{Service Principal Id}/synchronization/jobs/{AD2AAD Provisioning id}/schema を実行します。

    {Service Principal Id}{AD2ADD Provisioning Id} を独自の値に置き換えます。

  9. このクエリで同期スキーマが返されます。

    返されたスキーマ

次のステップ