如何使用 Microsoft 的混合 Azure AD Connect Cloud Sync 軟件

許多人已經在使用Azure Active Directory Connect來管理他們的混合身份和從Active Directory同步使用者到Azure Active Directory(最近更名為Microsoft Entra ID)。這種現代技術被稱為Azure AD Connect雲端同步。在本文中,我將帶你進行Azure AD Connect雲端同步的安裝和基本配置,並解釋如何將其實施到你的Active Directory/Azure AD基礎架構中。

Azure Active Directory Connect雲端同步是什麼?

許多IT專業人員對Azure AD Connect都很熟悉——這是一款用於將您的身分從本地Active Directory同步到Azure Active Directory並提供無縫單一登入的同步軟體。下一步的演進是將所有內容帶到雲端。

因此,微軟已經從在您的本地環境中安裝在域加入伺服器上的軟體應用程式轉變為一個簡單的配置代理。由於所有“重活”現在都在Azure中完成,因此具有更輕的足跡。不再需要在本地安裝資料庫——這一切都在雲端完成。

輕量級代理最近已成為趨勢。如果您最近經歷了合併或收購,或者正在計劃進行,這將是一個福音。

Azure AD Connect雲端同步旨在通過將您的用戶、聯繫人、群組、設備等同步到Azure AD來滿足並實現您的混合身分目標。一個重要的注意事項——您可以同時使用Azure AD Connect和雲端同步配置代理!

Azure AD Connect同步和Azure AD Connect云同步之间有什麼區別?

這是一個很好的問題!這裡有一個微軟提供的表格,顯示了這兩個產品之間的功能比較。

Feature Azure AD Connect sync Azure AD Connect cloud sync
Connect to a single on-premises AD forest
Connect to multiple on-premises AD forests
Connect to multiple disconnected on-premises AD forests
Lightweight agent installation model
Multiple active agents for high availability
Connect to LDAP directories
Support for user objects
Support for group objects
Support for contact objects
Support for device objects
Allow basic customization for attribute flows
Synchronize Exchange online attributes
Synchronize extension attributes 1-15
Synchronize customer-defined AD attributes (directory extensions)
Support for Password Hash Sync
Support for Pass-Through Authentication
Support for federation
Seamless Single Sign-on
Supports installation on a Domain Controller
Support for Windows Server 2016
Filter on Domains/OUs/groups
Filter on objects’ attribute values
Allow a minimal set of attributes to be synchronized (MinSync)
Allow removing attributes from flowing from AD to Azure AD
Allow advanced customization for attribute flows
Support for password writeback
Support for device writeback Customers should use Cloud Kerberos trust for this moving forward
Support for group writeback
Support for merging user attributes from multiple domains
Azure AD Domain Services support
Exchange hybrid writeback
Unlimited number of objects per AD domain
Support for up to 150,000 objects per AD domain
Groups with up to 50,000 members
Large groups with up to 250,000 members
Cross-domain references
On-demand provisioning
Support for US Government
Azure AD Connect sync vs. Azure AD Connect cloud sync (source: Microsoft)

目前,新版Azure AD Connect云同步功能不支持一個主要且普遍的情境,即Exchange混合。以下是微軟文檔中的目前解釋:

Exchange混合部署功能允許Exchange信箱在本地和Microsoft 365中共存。Azure AD Connect將一組特定的屬性從Azure AD同步回本地目錄。雲端提供代理目前不會將這些屬性同步回本地目錄,因此不支持用作Azure AD Connect的替代方案。

安裝Azure Active Directory Connect云同步的先決條件

在開始安裝之前,微軟提到了一些先決條件需要注意。讓我們在這裡看一下。

  • 在 Azure 门户中
    • 您需要访问仅限云的全局管理员帐户。
    • 您需要在 Azure 中放置一个自定义域名,以匹配您的活动目录中的 UPN 域名。如果您正在从 Azure AD Connect 迁移,这应该已经就位,但这也值得注意。
  • 在您的本地环境中
    • 您需要运行 Windows Server 2016 或更新版本的加入域的计算机。您至少需要 4 GB 的 RAM 和 .NET Framework 4.7.1 或更高版本。服务器只需要访问您本地 AD 林中至少一个 域控制器 的网络访问权限。
    • 您的边缘防火墙需要允许从此处的服务器到 Azure AD 的出站端口 80 和 443。

另一個(可選)步驟是首先卸載Azure AD Connect,如果您已安裝。這不是必需的,但為了本文的目的,我將在下一步中逐步介紹簡單的步驟。

哦,利用這種設置的高可用性非常容易。只需在您的網絡中的多個伺服器上安裝配置代理即可。您將在下面看到步驟。

卸載Azure AD Connect(可選)

  • 登錄到您的Azure AD Connect伺服器並打開控制面板
  • 打開“卸載程式”菜單。
Using Control Panel – Programs and Features to uninstall the older Azure AD Connect software (Image credit: Petri/Michael Reinders)
  • 點擊Microsoft Azure AD Connect條目,然後點擊卸載工具欄按鈕。
Uninstalling Azure AD Connect (Image credit: Petri/Michael Reinders)

我的建議是確保勾選該選項以移除所有內容。我總是喜歡盡可能乾淨地卸載軟件,盡我所能不留下任何殘留物。

  • 點擊移除並允許它完成。
It is gone. Out with the old, in with the new… (Image credit: Petri/Michael Reinders)

好了,全部消失了。現在,我們可以繼續進行新的安裝步驟。

如何在您的AD / AAD基礎設施中實施Azure AD Connect雲同步

正如我所說,您可以在您的環境中安裝Azure AD Connect雲同步代理,無論是否有現有的Azure AD Connect安裝。在這種情況下,我剛剛移除了我現有的Azure AD Connect軟件,所以我們有一個乾淨的開始。讓我們開始吧!

安裝

我們將從我的Windows Server 2022域加入服務器WS22-FS02開始。

  • 首先,登錄到Azure門戶並訪問Azure Active Directory(Azure AD)網站。
The Azure Active Directory portal (Image credit: Petri/Michael Reinders)
  • 在左側的導航菜單中,向下滾動並點擊Azure AD Connect。然後,再次在左側點擊雲同步
The Azure AD Connect Cloud Sync overview (Image credit: Petri/Michael Reinders)
  • 不出所料,我們有一個很好的乾淨開始。點擊左側的代理菜單,然後點擊下載本地代理
Downloading the agent to install on our on-premises server (Image credit: Petri/Michael Reinders)
  • 下載代理後,請繼續並雙擊MSI文件。安裝將開始。
Installing the bits for the provisioning agent (Image credit: Petri/Michael Reinders)
  • 勾選框並點擊安裝
Installing…and waiting… (Image credit: Petri/Michael Reinders)

接下來,我們進入配置

活動目錄配置

初始代理程式安裝完成後,Microsoft Azure Active Directory Connect Provisioning Agent Configuration精靈將啟動。快速說五次。哎呀,微軟。總是以產品名稱讓人驚艷!

  • 在歡迎畫面上,點擊下一步
Starting the very-long-titled wizard (Image credit: Petri/Michael Reinders)
  • 在「選擇擴展」畫面上,選擇基於 HR 的供應(Workday 和 SuccessFactors)/ Azure AD Connect 雲同步。這是最有可能的情況。只有在計劃將本地應用程式配置到 Azure 時,才會選擇第二個選項。
  • 點擊下一步
On the ‘Select Extension’ screen (Image credit: Petri/Michael Reinders)
  • 接著,出現連接到 Azure AD畫面,要求輸入您的 Azure AD 全域管理員憑證。輸入這些,準備好多因素驗證!
  • 接著是配置服務帳戶畫面。在這裡,我們將接受默認值,創建 gMSA。因為我們要求它創建一個 gMSA 帳戶來管理從 AD 同步到 Azure AD 的同步,我們需要輸入具有域管理員特權的帳戶。輸入後點擊下一步
Configuring the Service Account (Image credit: Petri/Michael Reinders)
  • 繼續,我們來到「連接活動目錄」畫面。是的,你是對的。這與安裝 Azure AD Connect 的安裝精靈相當類似。
Connecting to Active Directory (Image credit: Petri/Michael Reinders)
  • 無論如何,請驗證已設定正確的Active Directory網域。如果出現任何錯誤,您可能已輸入錯誤的憑據。如有需要,請更正並點擊下一步
We are done. We’re on the Confirm screen (Image credit: Petri/Michael Reinders)
  • 我們來到最終的確認畫面。確認一切正常後,點擊確認按鈕。
We’re done! (Image credit: Petri/Michael Reinders)

Azure AD配置

現在我們轉移到Azure Active Directory。要管理Azure AD雲端同步,再次瀏覽至Azure入口網站

  • 點擊Azure AD Connect,然後點擊雲同步
  • 點擊頂部的’新配置‘按鈕來開始雲端配置流程。
Back at the Cloud Sync configuration page (Image credit: Petri/Michael Reinders)
  • 這裡是新的雲同步配置。假設您只同步一個AD網域 – 在我的情況下是’reinders.local’,默認設置應該是正確的。我們將保持’啟用密碼雜湊同步‘的勾選,以允許自動密碼管理。
Our new configuration is all ready and verified. (Image credit: Petri/Michael Reinders)
  • 在底部點擊創建

好了,看看這個!我完成了。我不知道您如何,但我幾乎總是更喜歡基於雲端的配置而不是傳統的’厚’客戶端軟件。它更清潔。另外,他們可以更快地在UI上進行迭代並添加功能。而且,因為它是基於雲端的,您不需要擔心軟件的升級、服務器宕機等問題。它只是運作。雲端,百分之百的時間,對吧?

測試-驗證

让我们简单地启用配置。我们稍后可以处理作用域过滤器、属性映射等等。

  • 点击顶部的审阅并启用配置按钮,然后点击启用配置
  • 完成后,等待约2分钟,然后刷新您的浏览器,点击顶部的概述选项卡。
  • 首先,您需要输入通知电子邮件地址。点击属性选项卡,然后点击基本信息旁边的铅笔(编辑)图标
  • 输入一个管理员电子邮件地址,以便接收有关同步基础架构的警报。在底部点击应用
Setting up a notification email address (Image credit: Petri/Michael Reinders)

现在,关于验证和高级自定义,请返回到Azure AD门户中的用户视图,以查看所有用户。我注意到用户数量从31增加到32。所以,我知道发生了一些事情。而且,如果你真的在关注的话,你可能还记得我在配置Azure AD Connect时筛选出了一个特定OU中的用户。因此,因为我还没有进行任何筛选,一个新用户已经被同步了- John Reinders。

让我详细介绍一下你将用来维护和调整同步设置的三个核心配置屏幕。首先是作用域过滤器

Scoping Filters (Image credit: Petri/Michael Reinders)

預設是同步您的Active Directory中的所有使用者。您可以選擇僅同步選定的安全群組或組織單位(OUs)。是的,這是雲軟件目前比本地軟件可配置性較低的一個例子。但是,這種情況不斷在改變。最終,他們將把所有功能和選項都整合到Azure AD Connect雲同步中。

Attribute Mapping Screen (Image credit: Petri/Michael Reinders)

接下來,讓我們來看看屬性映射。在這裡,我們可以選擇編輯從Active Directory同步到Azure AD的屬性的預設列表,甚至可以通過點擊“+添加屬性映射”添加其他項目。

Adding a new attribute mapping (Image credit: Petri/Michael Reinders)

放心,這裡有很多選項。正如我所說,Microsoft不斷為這個功能添加更多功能。因此,如果您注意到這些屏幕中的一些變化或添加/刪除部分,也不要感到驚訝。這就是雲!

最後,讓我們來看看表達式生成器。這是您可以真正為某些屬性的同步添加一些自定義的地方,以及如何使用表達式來匹配來自一個Active Directory域的特定用戶屬性和來自另一個AD域的其他屬性,以生成Azure AD中最佳的單個對象。同樣,這裡有很大的功能,如果您曾使用過Azure AD Connect軟件中的同步規則等自定義功能,您將對一般的設置非常熟悉。

結論

嗯,這是很多信息。而且,我確實想指出Azure AD Connect雲同步的最大缺點是,它的功能較少,支持的方案也比Azure AD Connect少。

這是正常且經過設計的。Azure AD Connect 已經存在多年,Azure AD Connect 雲端同步大約一年前發布。因此,老版本軟體中有更多功能。

我的建議是:一旦 Azure AD Connect 雲端同步的支援方案符合您的環境,就採取步驟進行遷移。在我的「日常工作」中使用 Azure AD Connect 已經好幾年了,雲端功能看起來非常好,而且管理和監控的負擔輕得多。

請隨時在下方留下評論或問題,謝謝您的閱讀!

Source:
https://petri.com/install-azure-ad-connect-cloud-sync/