共用方式為


使用同盟移轉至 Microsoft Entra 多重要素驗證

將您的多重要素驗證 (MFA) 解決方案移轉至 Microsoft Entra ID,是您雲端旅程圖的首要步驟。 同時請考慮移轉至 Microsoft Entra ID,以便日後進行使用者驗證。 如需詳細資訊,請參閱使用雲端驗證移轉至 Microsoft Entra 多重要素驗證的流程。

若要使用同盟移轉至 Microsoft Entra 多重要素驗證,AD FS 上會安裝 Microsoft Entra 多重要素驗證提供者。 Microsoft Entra ID 信賴憑證者信任和其他信賴憑證者信任已設定為針對移轉的使用者使用 Microsoft Entra 多重要素驗證。

下圖顯示此移轉流程。

移轉流程的流程圖。本文件中的流程領域和標題的順序相同

建立移轉群組

若要建立新的條件式存取原則,您必須將這些原則指派給群組。 為此,您可以使用 Microsoft Entra 安全性群組或 Microsoft 365 群組。 您也可以建立或同步處理新的群組。

您也需要一個 Microsoft Entra 安全性群組,用來將使用者反覆移轉至 Microsoft Entra 多重要素驗證。 這些群組會用於您的宣告規則。

請勿重複使用安全性所使用的群組。 如果您使用安全性群組來保護具有條件式存取原則的高價值應用程式群組,請勿將該群組用於其他目的。

準備 AD FS

將 AD FS 伺服器陣列升級至 2019、FBL 4

在 AD FS 2019 中,您可以為信賴憑證者 (例如應用程式) 指定其他驗證方法。 您可以使用群組成員資格來決定驗證提供者。 藉由指定其他驗證方法,您可以轉換為 Microsoft Entra 多重要素驗證,並且在轉換期間讓其他驗證保持不變。 如需詳細資訊,請參閱升級至使用 WID 資料庫的 Windows Server 2016 AD FS。 本文討論如何將您的伺服器陣列升級至 AD FS 2019,並將您的 FBL 升級至 4。

設定宣告規則以叫用 Microsoft Entra 多重要素驗證

現在 Microsoft Entra 多重要素驗證已成為其他驗證方法了,您可以指派使用者群組使用它。 您可以藉由設定宣告規則 (也稱為信賴憑證者信任) 來執行這項操作。 藉由使用群組,您可以控制要全域或透過應用程式呼叫哪些驗證提供者。 例如,您可以針對已註冊合併安全性資訊的使用者呼叫 Microsoft Entra 多重要素驗證,同時針對其他使用者呼叫 MFA 伺服器。

注意

宣告規則需要內部部署安全性群組。 對宣告規則進行變更之前,請先加以備份。

備份規則

設定新的宣告規則之前,請先備份您的規則。 您在執行清除步驟時將需還原這些規則。

視您的設定而定,您可能也需要複製此規則,並附加為移轉建立的新規則。

若要檢視全域規則,請執行:

Get-AdfsAdditionalAuthenticationRule

若要檢視信賴憑證者信任,請執行下列命令,並將 RPTrustName 取代為信賴憑證者信任宣告規則的名稱:

(Get-AdfsRelyingPartyTrust -Name "RPTrustName").AdditionalAuthenticationRules 

存取控制原則

注意

存取控制原則無法設定成根據群組成員資格來叫用特定驗證提供者。

若要從存取控制原則轉換為其他驗證規則,請使用 MFA 伺服器驗證提供者,針對每個信賴憑證者信任執行下列命令:

Set-AdfsRelyingPartyTrust -TargetName AppA -AccessControlPolicyName $Null

此命令會將您目前存取控制原則中的邏輯移轉至其他驗證規則。

設定群組,並尋找 SID

您必須具有特定群組,以放置您要為其叫用 Microsoft Entra 多重要素驗證的使用者。 您會需要該群組的安全性識別碼 (SID)。

若要尋找群組 SID,請使用下列命令,並提供您的群組名稱

Get-ADGroup "GroupName"

顯示 Get-ADGroup 指令碼結果的螢幕擷取畫面影像。

設定宣告規則以呼叫 Microsoft Entra 多重要素驗證

當群組中的使用者不在公司網路上時,下列 PowerShell Cmdlet 會為其叫用 Microsoft Entra 多重要素驗證。 請將 "YourGroupSid" 取代為執行上述 Cmdlet 所找到的 SID。

請務必檢閱如何在 2019 中選擇其他驗證提供者

重要

備份您的宣告規則

設定全域宣告規則

執行下列 PowerShell cmdlet:

(Get-AdfsRelyingPartyTrust -Name "RPTrustName").AdditionalAuthenticationRules

此命令會針對您的信賴憑證者信任傳回您目前的其他驗證規則。 將下列規則附加至目前的宣告規則:

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", Value == 
"YourGroupSID"] => issue(Type = "http://schemas.microsoft.com/claims/authnmethodsproviders", 
Value = "AzureMfaAuthentication");
not exists([Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", 
Value=="YourGroupSid"]) => issue(Type = 
"http://schemas.microsoft.com/claims/authnmethodsproviders", Value = 
"AzureMfaServerAuthentication");'

下列範例假設您目前的宣告規則已設定為在使用者從您的網路外部連線時提示進行 MFA。 此範例包含您需要附加的其他規則。

Set-AdfsAdditionalAuthenticationRule -AdditionalAuthenticationRules 'c:[type == 
"http://schemas.microsoft.com/ws/2012/01/insidecorporatenetwork", value == "false"] => issue(type = 
"http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod", value = 
"http://schemas.microsoft.com/claims/multipleauthn" );
 c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", Value == 
"YourGroupSID"] => issue(Type = "http://schemas.microsoft.com/claims/authnmethodsproviders", 
Value = "AzureMfaAuthentication");
not exists([Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", 
Value=="YourGroupSid"]) => issue(Type = 
"http://schemas.microsoft.com/claims/authnmethodsproviders", Value = 
"AzureMfaServerAuthentication");'

設定每個應用程式的宣告規則

此範例會修改特定信賴憑證者信任 (應用程式) 的宣告規則,並包含您必須附加的資訊。

Set-AdfsRelyingPartyTrust -TargetName AppA -AdditionalAuthenticationRules 'c:[type == 
"http://schemas.microsoft.com/ws/2012/01/insidecorporatenetwork", value == "false"] => issue(type = 
"http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod", value = 
"http://schemas.microsoft.com/claims/multipleauthn" );
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", Value == 
"YourGroupSID"] => issue(Type = "http://schemas.microsoft.com/claims/authnmethodsproviders", 
Value = "AzureMfaAuthentication");
not exists([Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", 
Value=="YourGroupSid"]) => issue(Type = 
"http://schemas.microsoft.com/claims/authnmethodsproviders", Value = 
"AzureMfaServerAuthentication");'

在 AD FS 中將 Microsoft Entra 多重要素驗證設定為驗證提供者

若要設定 AD FS 的 Microsoft Entra 多重要素驗證,您必須設定每個 AD FS 伺服器。 如果您的伺服器陣列中有多個 AD FS 伺服器,您可以使用 Azure AD PowerShell 從遠端進行設定。

如需此流程的逐步指示,請參閱使用 AD FS 將 Microsoft Entra 多重要素驗證設定為驗證提供者一文中的設定 AD FS 伺服器

設定伺服器之後,您可以將 Microsoft Entra 多重要素驗證新增為其他驗證方法。

顯示編輯驗證方法畫面的螢幕擷取畫面,其中已選取 Microsoft Entra 多重要素驗證和 Azure Mutli-Factor Authentication Server

準備 Microsoft Entra ID 並實作移轉

本節涵蓋移轉使用者 MFA 設定之前的最終步驟。

將 federatedIdpMfaBehavior 設定為 enforceMfaByFederatedIdp

針對同盟網域,可由 Microsoft Entra 條件式存取或由內部部署同盟提供者來強制執行 MFA。 每個同盟網域都會有一個名為 federatedIdpMfaBehavior 的 Microsoft Graph PowerShell 安全性設定。 您可以將 federatedIdpMfaBehavior 設定為 enforceMfaByFederatedIdp,讓 Microsoft Entra ID 可以接受同盟識別提供者所執行的 MFA。 如果同盟識別提供者未執行 MFA,則 Microsoft Entra ID 會將要求重新導向至同盟識別提供者,以執行 MFA。 如需詳細資訊,請參閱 federatedIdpMfaBehavior

注意

federatedIdpMfaBehavior 設定是 New-MgDomainFederationConfiguration Cmdlet 的 SupportsMfa 屬性新版本。

對於設定 SupportsMfa 屬性的網域,這些規則會決定 federatedIdpMfaBehaviorSupportsMfa 如何一起運作:

  • 不支援在 federatedIdpMfaBehaviorSupportsMfa 之間切換。
  • 設定 federatedIdpMfaBehavior 屬性之後,Microsoft Entra ID 會忽略 SupportsMfa 設定。
  • 如果從未設定 federatedIdpMfaBehavior 屬性,則 Microsoft Entra ID 將會繼續採用 SupportsMfa 設定。
  • 如果未設定 federatedIdpMfaBehaviorSupportsMfa,則 Microsoft Entra ID 將預設為 acceptIfMfaDoneByFederatedIdp 行為。

您可以使用 Get-MgDomainFederationConfiguration 來檢查 federatedIdpMfaBehavior 的狀態。

Get-MgDomainFederationConfiguration –DomainID yourdomain.com

您也可以使用 Get-MgDomainFederationConfiguration 來檢查 SupportsMfa 旗標的狀態:

Get-MgDomainFederationConfiguration –DomainName yourdomain.com

下列範例顯示如何使用 Graph PowerShell 將 federatedIdpMfaBehavior 設定為 enforceMfaByFederatedIdp

要求

PATCH https://graph.microsoft.com/beta/domains/contoso.com/federationConfiguration/6601d14b-d113-8f64-fda2-9b5ddda18ecc
Content-Type: application/json
{
  "federatedIdpMfaBehavior": "enforceMfaByFederatedIdp"
}

回應

注意:為了方便閱讀,此處顯示的回應物件可能會縮短。

HTTP/1.1 200 OK
Content-Type: application/json
{
  "@odata.type": "#microsoft.graph.internalDomainFederation",
  "id": "6601d14b-d113-8f64-fda2-9b5ddda18ecc",
   "issuerUri": "http://contoso.com/adfs/services/trust",
   "metadataExchangeUri": "https://sts.contoso.com/adfs/services/trust/mex",
   "signingCertificate": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u",
   "passiveSignInUri": "https://sts.contoso.com/adfs/ls",
   "preferredAuthenticationProtocol": "wsFed",
   "activeSignInUri": "https://sts.contoso.com/adfs/services/trust/2005/usernamemixed",
   "signOutUri": "https://sts.contoso.com/adfs/ls",
   "promptLoginBehavior": "nativeSupport",
   "isSignedAuthenticationRequestRequired": true,
   "nextSigningCertificate": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u",
   "signingCertificateUpdateStatus": {
        "certificateUpdateResult": "Success",
        "lastRunDateTime": "2021-08-25T07:44:46.2616778Z"
    },
   "federatedIdpMfaBehavior": "enforceMfaByFederatedIdp"
}

視需要設定條件式存取原則

如果您使用條件式存取來決定何時會提示使用者進行 MFA,則應該不需要變更您的原則。

如果您的同盟網域將 SupportsMfa 設定為 false,則請分析 Microsoft Entra ID 信賴憑證者信任的宣告規則,並建立支援相同安全性目標的條件式存取原則。

建立條件式存取原則以強制執行與 AD FS 相同的控制之後,您可以備份並移除 Microsoft Entra ID 信賴憑證者的宣告規則自訂。

如需詳細資訊,請參閱以下資源:

註冊使用者以進行 Microsoft Entra 多重要素驗證

本節介紹使用者如何註冊合併安全性 (MFA 和自助式密碼重設),以及如何移轉其 MFA 設定。 Microsoft Authenticator 可在無密碼模式下使用。 此外也可在任一註冊方法中作為 MFA 的第二個要素。

建議讓您的使用者註冊合併安全性資訊,這是為 MFA 和 SSPR 註冊其驗證方法和裝置的單一位置。

Microsoft 提供通訊範本,您可以將其提供給使用者,引導他們完成合併註冊程序。 其中包括電子郵件、海報、桌上型立牌和各種其他資產的範本。 使用者會在 https://aka.ms/mysecurityinfo 註冊其資訊,這會將其帶往合併安全性註冊畫面。

建議您使用條件式存取來保護安全性註冊程序,以要求從信任的裝置或位置進行註冊。 如需追蹤註冊狀態的資訊,請參閱 Microsoft Entra ID 的驗證方法活動 (部分機器翻譯)。

注意

如果使用者必須從非信任的位置或裝置註冊合併安全性資訊,可以對其發行臨時存取密碼或暫時將其從原則中排除。

從 MFA 伺服器移轉 MFA 設定

您可以使用 MFA 伺服器移轉公用程式將已註冊的使用者 MFA 設定從 MFA 伺服器同步至 Microsoft Entra ID。 您可以同步電話號碼、硬體權杖和裝置註冊,例如 Microsoft Authenticator 設定。

將使用者新增至適當的群組

  • 如果您已建立新的條件式存取原則,請將適當的使用者新增至這些群組。

  • 如果您為宣告規則建立了內部部署安全性群組,請將適當的使用者新增至這些群組。

不建議您重複使用安全性所使用的群組。 如果您使用安全性群組來保護具有條件式存取原則的高價值應用程式群組,請勿將該群組用於其他目的。

監視

您可以使用驗證方法使用方式與深入解析報告,來監視 Microsoft Entra 多重要素驗證註冊。 您可以在 Microsoft Entra ID 中找到此報告。 選取 [監視],然後選取 [使用方式與深入解析]

在 [使用方式與深入解析] 中,選取 [驗證方法]

您可以在 [註冊] 索引標籤上找到詳細的 Microsoft Entra 多重要素驗證註冊資訊。您可以選取 [有能力進行 Azure 多重要素驗證的使用者] 超連結,向下鑽研以檢視已註冊使用者的清單。

驗證方法活動的螢幕擷取畫面,顯示使用者註冊 MFA

清除步驟

當您完成 Microsoft Entra 多重要素驗證的移轉,並做好解除委任 MFA 伺服器的準備後,請執行下列三項作業:

  1. 將 AD FS 的宣告規則還原為其移轉前的設定,並移除 MFA 伺服器驗證提供者。

  2. 移除在 AD FS 中作為驗證提供者的 MFA 伺服器。 這可確保所有使用者都會使用 Microsoft Entra 多重要素驗證,因為這將是唯一啟用的其他驗證方法。

  3. 解除委任 MFA 伺服器。

還原 AD FS 上的宣告規則,並移除 MFA 伺服器驗證提供者

遵循設定宣告規則以叫用 Microsoft Entra 多重要素驗證下的步驟來還原至已備份的宣告規則,並移除所有 AzureMFAServerAuthentication 宣告規則。

例如,從規則中移除下列內容:

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", Value ==
"**YourGroupSID**"] => issue(Type = "http://schemas.microsoft.com/claims/authnmethodsproviders",
Value = "AzureMfaAuthentication");
not exists([Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid",
Value=="YourGroupSid"]) => issue(Type =
"http://schemas.microsoft.com/claims/authnmethodsproviders", Value =
"AzureMfaServerAuthentication");'

停用在 AD FS 中作為驗證提供者的 MFA 伺服器

此變更可確保只會使用 Microsoft Entra 多重要素驗證作為驗證提供者。

  1. 開啟 AD FS 管理主控台

  2. 在 [服務] 底下,以滑鼠右鍵按一下 [驗證方法],然後選取 [編輯多重要素驗證方法]

  3. 取消核取 [Azure Multi-Factor Authentication Server] 旁的方塊。

解除委任 MFA 伺服器

依照您的企業伺服器解除委任程序,以移除您環境中的 MFA 伺服器。

解除委任 MFA 伺服器時的可能考量包括:

  • 檢閱 MFA 伺服器記錄,確保沒有任何使用者或應用程式正在使用此伺服器,再將其移除。

  • 從伺服器的控制台解除安裝 Multi-Factor Authentication Server

  • 選擇性地先清除備份之後遺留的記錄和資料目錄。

  • 解除安裝多重要素驗證網頁伺服器 SDK,包括任何留在 inetpub\wwwroot\MultiFactorAuthWebServiceSdk 和 (或) MultiFactorAuth 目錄中的檔案 (如果適用)

  • 對於 8.0 之前的 MFA 伺服器版本,可能也需要移除多重要素驗證電話應用程式 Web 服務

後續步驟