分享方式:


瞭解 Microsoft Entra 架構

Microsoft Entra ID 中的物件,就像任何目錄一樣,是一種程式設計的高階資料建構,代表使用者、群組和連絡人等專案。 當您在 Microsoft Entra ID 中建立新的使用者或連絡人時,您要建立該物件的新實例。 這些實例可以根據其屬性來區分。

Microsoft Entra 識別碼中的屬性是負責將物件實例的相關資訊儲存在 Microsoft Entra ID 中的元素。

Microsoft Entra 架構會定義哪些屬性可用於專案的規則、這些屬性可能擁有的值種類,以及使用者如何與這些值互動。

Microsoft Entra ID 有兩種類型的屬性:

  • 內建屬性:Microsoft Entra 架構預先定義的屬性 。 這些屬性提供不同的用途,而且可能無法存取。
  • 目錄延伸 模組:提供的屬性,讓您可以自訂 Microsoft Entra ID 以供自己使用。 例如,如果您已使用特定屬性擴充內部部署的 Active Directory,而且想要流動該屬性,您可以使用其中一個提供的自訂屬性。

每個雲端同步設定都包含 同步架構 。 此同步處理架構會定義要同步處理哪些物件,以及其同步處理方式。

屬性和運算式

將使用者之類的物件布建至 Microsoft Entra ID 時,會建立使用者物件的新實例。 此建立包含該物件的屬性,也稱為屬性。 一開始,新建立的物件會將其屬性設定為同步處理規則所決定的值。 然後,這些屬性會透過雲端布建代理程式保持在最新狀態。

Object provisioning

例如,使用者可能是行銷部門的一部分。 其 Microsoft Entra 部門屬性一開始會在布建時建立,且值設定為 Marketing。 六個月後,如果他們變更為 Sales,則其內部部署的 Active Directory部門屬性會變更為 Sales。 這項變更會同步處理至 Microsoft Entra 識別碼,並反映在其 Microsoft Entra 使用者物件中。

屬性同步處理可能是直接的,其中 Microsoft Entra ID 中的值會直接設定為內部部署屬性的值。 或者,程式設計運算式可能會處理同步處理。 在必須進行某些邏輯或判斷以填入值的情況下,需要程式設計運算式。

例如,如果您擁有郵件屬性 「 john.smith@contoso.com 」 且需要移除 「@contoso.com」 部分,且只流動值 「john.smith」,您就會使用類似下列內容:

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

範例輸入/輸出:

  • 輸入 (郵件):「 john.smith@contoso.com 」
  • 輸出 :「john.smith」

如需如何撰寫自訂表格達式和語法的詳細資訊,請參閱 在 Microsoft Entra ID 中撰寫屬性對應的運算式。

下表列出一般屬性,以及它們如何同步處理至 Microsoft Entra ID。

內部部署 Active Directory 對應類型 Microsoft Entra ID
cn 直接 commonName
countryCode 直接 countryCode
displayName 直接 displayName
givenName 運算式 givenName
objectGUID 直接 sourceAnchorBinary
userPrincipalName 直接 userPrincipalName
proxyAddress 直接 ProxyAddress

檢視同步處理架構

警告

雲端同步設定會建立服務主體。 服務主體會顯示在 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 識別碼下的 [應用程式註冊] 節點取得。

  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": "00aa00aa-bb11-cc22-dd33-44ee44ee44ee",
                "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

    將 和 {AD2ADD Provisioning Id} 取代 {Service Principal Id} 為您的值。

  9. 此查詢會傳 回同步處理架構

    Returned schema

下一步