Microsoft Entra Connect 可讓您的使用者使用相同的密碼登入雲端和內部部署資源。 本文說明每個身分識別模型的重要概念,可協助您選擇您想要用來登入Microsoft Entra ID 的身分識別。
如果您已經熟悉 Microsoft Entra 身分識別模型,並想要深入瞭解特定方法,請參閱適當的連結:
- 密碼哈希同步處理 與 無縫單一登錄 (SSO)
- Pass-through authentication with Seamless Single Sign-on (SSO)
- Federated SSO (with Active Directory Federation Services (AD FS))
- Federation with PingFederate
Note
請務必記住,透過為 Microsoft Entra ID 設定同盟,您可以在 Microsoft Entra 租使用者與同盟域之間建立信任。 使用此受信任的同盟網域的使用者,可存取租戶內的 Microsoft Entra 雲端資源。
為您的組織選擇使用者登入方法
實作 Microsoft Entra Connect 的第一個決策是選擇使用者將用來登入的驗證方法。 請務必確定您選擇符合組織安全性和進階需求的正確方法。 驗證很重要,因為它會驗證使用者的身分識別,以存取雲端中的應用程式和數據。 若要選擇正確的驗證方法,您必須考慮實作您選擇的時間、現有基礎結構、複雜度和成本。 每個組織都有不同的這些因素,而且可能會隨著時間而變更。
Microsoft Entra ID 支援下列驗證方法:
-
雲端驗證 - 當您選擇此驗證方法時,Microsoft Entra ID 會處理使用者的登入驗證程式。 透過雲端驗證,您可以選擇兩個選項:
- 密碼哈希同步處理 (PHS) - 密碼哈希同步可讓使用者使用內部部署所使用的相同使用者名稱和密碼,而不需要部署除了 Microsoft Entra Connect 之外的任何其他基礎結構。
- Pass-through authentication (PTA) - This option is similar to password hash sync, but provides a simple password validation using on-premises software agents for organizations with strong security and compliance policies.
- 同盟驗證 - 當您選擇此驗證方法時,Microsoft Entra ID 會將驗證程式交給個別的受信任驗證系統,例如 AD FS 或第三方同盟系統,以驗證使用者的登入。
對於大部分只想要讓使用者登入Microsoft 365、SaaS 應用程式和其他Microsoft以 Entra ID 為基礎的資源的組織,我們建議使用預設的密碼哈希同步處理選項。
如需選擇驗證方法的詳細資訊,請參閱 為Microsoft Entra 混合式身分識別解決方案選擇正確的驗證方法
密碼哈希同步處理
使用密碼哈希同步處理,用戶密碼的哈希會從內部部署 Active Directory 同步處理至 Microsoft Entra ID。 當密碼變更或重設內部部署時,新的密碼哈希會立即同步處理至Microsoft Entra ID,讓使用者一律可以針對雲端資源和內部部署資源使用相同的密碼。 密碼永遠不會傳送至Microsoft Entra 標識符,或儲存在純文本Microsoft Entra 標識符中。 您可以使用密碼哈希同步處理搭配密碼回寫,在 Microsoft Entra ID 中啟用自助式密碼重設。
In addition, you can enable Seamless SSO for users on domain-joined machines that are on the corporate network. 使用單一登錄時,啟用的使用者只需要輸入使用者名稱,以協助他們安全地存取雲端資源。
如需詳細資訊,請參閱 密碼哈希同步處理 一文。
Pass-through authentication
透過直通驗證,用戶的密碼會與內部部署的 Active Directory 域控制器進行驗證。 密碼不需要以任何形式出現在 Microsoft Entra ID 中。 This allows for on-premises policies, such as sign-in hour restrictions, to be evaluated during authentication to cloud services.
Pass-through authentication uses a simple agent on a Windows Server domain-joined machine in the on-premises environment. 此代理程式會接聽密碼驗證要求。 它不需要對因特網開啟任何輸入埠。
此外,您也可以為公司網路上已加入網域的機器上的使用者啟用單一登錄。 使用單一登錄時,啟用的使用者只需要輸入使用者名稱,以協助他們安全地存取雲端資源。
如需詳細資訊,請參閱:
Federation that uses a new or existing farm with AD FS in Windows Server
使用同盟登入,您的使用者可以使用其內部部署密碼登入Microsoft Entra ID 型服務。 在公司網路上時,他們甚至不需要輸入密碼。 透過將同盟選項與 AD FS 搭配使用,您可以在 Windows Server 2022 中使用 AD FS 部署新的或現有的伺服器陣列。 如果您選擇指定現有的伺服器陣列,Microsoft Entra Connect 會設定伺服器陣列與 Microsoft Entra 識別碼之間的信任,讓使用者可以登入。
在 Windows Server 2022 中部署與 AD FS 的同盟
If you're deploying a new farm, you need:
A Windows Server 2022 server for the federation server.
A Windows Server 2022 server for the Web Application Proxy.
具有一個 TLS/SSL 憑證的 .pfx 檔案,適用於您預定的同盟服務名稱。 例如:fs.contoso.com。
如果您要部署新的伺服器陣列或使用現有的伺服器陣列,您需要:
- Local administrator credentials on your federation servers.
- Local administrator credentials on any workgroup servers (not domain-joined) that you intend to deploy the Web Application Proxy role on.
- The machine that you run the wizard on to be able to connect to any other machines that you want to install AD FS or Web Application Proxy on by using Windows Remote Management.
如需詳細資訊,請參閱 使用 AD FS 設定 SSO。
與 PingFederate 同盟
使用同盟登入,您的使用者可以使用其內部部署密碼登入Microsoft Entra ID 型服務。 在公司網路上時,他們甚至不需要輸入密碼。
如需設定 PingFederate 以搭配 Microsoft Entra 識別碼使用的詳細資訊,請參閱 Ping Identity Support。
如需使用 PingFederate 設定 Microsoft Entra Connect 的詳細資訊,請參閱 Microsoft Entra Connect 自定義安裝
使用舊版AD FS或第三方解決方案登入
如果您已使用舊版 AD FS(例如 AD FS 2.0)或第三方同盟提供者來設定雲端登入,您可以選擇透過 Microsoft Entra Connect 略過使用者登入設定。 這可讓您取得 Microsoft Entra Connect 的最新同步處理和其他功能,同時仍使用現有的解決方案進行登入。
如需詳細資訊,請參閱 Microsoft Entra 第三方同盟相容性清單。
User sign-in and UserPrincipalName
Understanding UserPrincipalName
在 Active Directory 中,預設 UserPrincipalName (UPN) 後綴是使用者帳戶建立所在網域的 DNS 名稱。 在大部分情況下,這是在網際網路上註冊為企業域名的域名。 不過,您可以使用 Active Directory 網域和信任來新增更多 UPN 後綴。
使用者的 UPN 格式username@domain。 例如,對於名為 「contoso.com」 的 Active Directory 網域,名為 John 的使用者可能會有 UPN “john@contoso.com”。 使用者的UPN是以 RFC 822 為基礎。 雖然 UPN 和電子郵件共用相同的格式,但使用者的 UPN 值可能或可能與使用者的電子郵件位址不同。
UserPrincipalName in Microsoft Entra ID
The Microsoft Entra Connect wizard uses the userPrincipalName attribute or lets you specify the attribute (in a custom installation) to be used from on-premises as the UserPrincipalName in Microsoft Entra ID. 這是用來登入 Microsoft Entra ID 的值。 如果 userPrincipalName 屬性的值未對應至 Microsoft Entra ID 中已驗證的網域,則 Microsoft Entra ID 會將它取代為預設的 .onmicrosoft.com 值。
Microsoft Entra ID 中的每個目錄都有內建域名,格式為 contoso.onmicrosoft.com,可讓您開始使用 Microsoft Entra 或其他Microsoft在線服務。 您可以使用自訂網域來改善和簡化登入體驗。 如需Microsoft Entra ID 中自定義功能變數名稱以及如何驗證網域的資訊,請參閱 將自定義功能變數名稱新增至 Microsoft Entra ID。
Microsoft Entra 登入設定
Microsoft Entra sign-in configuration with Microsoft Entra Connect
The Microsoft Entra sign-in experience depends on whether Microsoft Entra ID can match the UserPrincipalName suffix of a user that's being synced to one of the custom domains that are verified in the Microsoft Entra directory. Microsoft Entra Connect 可協助您設定Microsoft Entra 登入設定,讓使用者在雲端登入體驗類似於內部部署體驗。
Microsoft Entra Connect 會列出針對網域定義的 UPN 後綴,並嘗試比對Microsoft Entra ID 中的自定義網域。 然後,它可協助您採取所需的適當動作。 Microsoft Entra 登入頁面會列出針對內部部署 Active Directory 定義的 UPN 後綴,並針對每個後綴顯示對應的狀態。 狀態值可以是下列其中一項:
State | 描述 | 需要行動 |
---|---|---|
驗證 | Microsoft Entra Connect 在 Microsoft Entra ID 中找到相符的已驗證網域。 此網域的所有使用者都可以使用其內部部署認證登入。 | 不需要採取任何動作。 |
未驗證 | Microsoft Entra Connect 在 Microsoft Entra ID 中找到相符的自定義網域,但未驗證。 未驗證此網域的情況下,同步後此網域使用者的 UPN 後綴將會變更為預設的 .onmicrosoft.com 後綴。 | 確認 Microsoft Entra ID 中的自定義網域。 |
未新增 | Microsoft Entra Connect 找不到對應至 UPN 後綴的自定義網域。 如果未在 Entra ID 中新增並驗證網域,此網域使用者的 UPN 後綴將會變更為預設的 .onmicrosoft.com 後綴。 | 新增並驗證對應至UPN後綴的自定義網域。 |
The Microsoft Entra sign-in page lists the UPN suffixes that are defined for on-premises Active Directory and the corresponding custom domain in Microsoft Entra ID with the current verification status. In a custom installation, you can now select the attribute for the UserPrincipalName on the Microsoft Entra sign-in page.
您可以按下 [重新整理] 按鈕,從 Microsoft Entra ID 重新擷取自定義網域的最新狀態。
選取 Microsoft Entra ID 中 UserPrincipalName 的屬性
userPrincipalName 屬性是使用者在登入 Microsoft Entra ID 和 Microsoft 365 時所使用的屬性。 You should verify the domains (also known as UPN suffixes) that are used in Microsoft Entra ID before the users are synchronized.
強烈建議您保留預設屬性 userPrincipalName。 如果此屬性不可路由且無法驗證,則可以選取另一個屬性(例如電子郵件)作為保存登入標識符的屬性。 這稱為替代標識碼。 替代標識碼屬性值必須遵循 RFC 822 標準。 You can use an Alternate ID with both password SSO and federation SSO as the sign-in solution.
Note
使用替代標識碼與所有Microsoft 365 工作負載不相容。 如需詳細資訊,請參閱 設定替代登入識別碼。
不同的自定義網域狀態及其對 Entra ID 登入體驗的影響
請務必瞭解您Microsoft Entra 目錄中自定義網域狀態與內部部署定義的 UPN 後綴之間的關聯性。 當您使用 Microsoft Entra Connect 設定同步處理時,讓我們流覽不同的可能 Entra ID 登入體驗。
For the following information, let's assume that we're concerned with the UPN suffix contoso.com, which is used in the on-premises directory as part of UPN--for example user@contoso.com.
快速設定/密碼哈希同步處理
State | 對使用者 Entra ID 登入體驗的影響 |
---|---|
未新增 | 在此情況下,contoso.com 的自定義網域尚未新增到 Microsoft Entra 目錄中。 擁有UPN內部部署且後綴為 @contoso.com 的使用者將無法使用其內部部署UPN登入 Entra ID。 They'll instead have to use a new UPN that's provided to them by Microsoft Entra ID by adding the suffix for the default Microsoft Entra directory. 例如,如果您要將使用者同步到 Microsoft Entra 目錄 contoso.onmicrosoft.com,則會為本地使用者 user@contoso.com 指定一個 UPN user@contoso.onmicrosoft.com。 |
未驗證 | 在此情況下,我們有一個自定義網域 contoso.com 已新增至 Microsoft Entra 目錄中。 不過,尚未驗證。 如果您在未驗證網域的情況下繼續同步使用者,使用者將會由 Microsoft Entra ID 指派新的 UPN,就像在「未新增」的案例中一樣。 |
驗證 | In this case, we have a custom domain contoso.com that's already added and verified in Microsoft Entra ID for the UPN suffix. Users will be able to use their on-premises UserPrincipalName, for example user@contoso.com, to sign in to Entra after they're synced to Microsoft Entra ID. |
AD FS 同盟
您無法在 Microsoft Entra ID 中使用預設的 .onmicrosoft.com 網域或未驗證的自定義網域來建立同盟。 When you're running the Microsoft Entra Connect wizard, if you select an unverified domain to create a federation with, then Microsoft Entra Connect prompts you with the necessary records to be created where your DNS is hosted for the domain. For more information, see Verify the Microsoft Entra domain selected for federation.
If you selected the user sign-in option Federation with AD FS, then you must have a custom domain to continue creating a federation in Microsoft Entra ID. 在我們的討論中,這表示我們應該在 Microsoft Entra 目錄中新增自定義網域 contoso.com。
State | 對使用者 Entra ID 登入體驗的影響 |
---|---|
未新增 | 在此情況下,Microsoft Entra Connect 在 Microsoft Entra 目錄中找不到 UPN 後綴 contoso.com 相符的自定義網域。 如果您需要使用者使用內部部署的 UPN 透過 AD FS 登入,則需要新增自訂網域 contoso.com(例如 user@contoso.com)。 |
未驗證 | 在此情況下,Microsoft Entra Connect 會提示您提供有關如何在稍後階段驗證網域的適當詳細數據。 |
驗證 | 在此情況下,您可以繼續進行設定,而不需要採取任何進一步的動作。 |
變更使用者登入方法
You can change the user sign-in method from federation, password hash synchronization, or pass-through authentication by using the tasks that are available in Microsoft Entra Connect after the initial configuration of Microsoft Entra Connect with the wizard. 再次執行 Microsoft Entra Connect 精靈,您會看到您可以執行的工作清單。 從工作清單中選取 變更使用者登入。
在下一個頁面上,系統會要求您提供Microsoft Entra標識符的認證。
On the User sign-in page, select the desired user sign-in.
Note
如果您只將暫時切換至密碼哈希同步處理,請選取 [[不要轉換使用者帳戶] 複選框。 不選中此選項將會把每個用戶轉換為聯邦制,這可能需要數小時的時間。
後續步驟
- Learn more about integrating your on-premises identities with Microsoft Entra ID.
- 進一步了解 Microsoft Entra Connect 設計概念。