變化
透過轉換,您可以使用雲端同步來變更屬性與 Microsoft Entra ID 同步時的預設行為。
若要執行這項工作,您必須編輯架構,然後透過 Web 要求重新提交。
如需雲端同步屬性的詳細資訊,請參閱 瞭解 Microsoft Entra 架構。
擷取架構
若要擷取架構,請遵循 檢視同步處理架構中的步驟。
自訂屬性對應
若要新增自定義屬性對應,請遵循下列步驟。
將架構複製到文字或程式代碼編輯器中,例如 Visual Studio Code。
找出您想要在架構中更新的物件。
找出用戶物件下
ExtensionAttribute3
的程式代碼。{ "defaultValue": null, "exportMissingReferences": false, "flowBehavior": "FlowWhenChanged", "flowType": "Always", "matchingPriority": 0, "targetAttributeName": "ExtensionAttribute3", "source": { "expression": "Trim([extensionAttribute3])", "name": "Trim", "type": "Function", "parameters": [ { "key": "source", "value": { "expression": "[extensionAttribute3]", "name": "extensionAttribute3", "type": "Attribute", "parameters": [] } } ] } },
編輯程式代碼,讓公司屬性對應至
ExtensionAttribute3
。{ "defaultValue": null, "exportMissingReferences": false, "flowBehavior": "FlowWhenChanged", "flowType": "Always", "matchingPriority": 0, "targetAttributeName": "ExtensionAttribute3", "source": { "expression": "Trim([company])", "name": "Trim", "type": "Function", "parameters": [ { "key": "source", "value": { "expression": "[company]", "name": "company", "type": "Attribute", "parameters": [] } } ] } },
將架構複製回 Graph Explorer,將 要求類型 變更為 PUT,然後選取 [執行查詢]。
現在,在入口網站中,移至雲端同步設定,然後選取 [重新啟動布建]。
一段時間后,請在 Graph 總管中執行下列查詢來確認屬性是否已填入:
https://graph.microsoft.com/beta/users/{Azure AD user UPN}
。您現在應該會看到這個數值。
使用函數進行自定義屬性對應
如需更進階的對應,您可以使用可操控數據的函式,並為屬性創造值,以符合組織的需求。
若要執行這項工作,請遵循先前的步驟,然後編輯用來建構最終值的函式。
如需表達式語法和範例的詳細資訊,請參閱 在 Microsoft Entra ID中撰寫屬性對應的表達式。