在 Authenticator 中启用通行密钥

本文列出了在 Authenticator 中为 Microsoft Entra ID 启用和强制使用通行密钥的步骤。 首先,更新身份验证方法策略以允许用户在认证器中使用密码钥匙注册和登录。 然后,可以使用条件访问身份验证强度策略,以便在用户访问敏感资源时强制要求使用通行密钥登录。

要求

  • Microsoft Entra 多重身份验证 (MFA)

  • Android 14 及更高版本或 iOS 17 及更高版本。

  • 对于跨设备注册和身份验证:

    • 这两台设备都必须启用蓝牙。
    • 必须在组织中允许与这两个终结点建立 Internet 连接:
      • https://cable.ua5v.com
      • https://cable.auth.com

    注意

    如果启用认证,用户无法使用跨设备注册。

若要了解有关 FIDO2 支持的详细信息,请参阅 支持使用 Microsoft Entra ID进行 FIDO2 身份验证。

在管理中心启用 Authenticator 通行密钥

  1. 至少以身份验证策略管理员的身份登录到 Microsoft Entra 管理中心

  2. 浏览到 Entra ID>身份验证方法>身份验证方法策略

  3. 在“通行密钥(FIDO2)”方法下,选择“所有用户”,或选择“添加组”以选择特定的组仅支持安全组

  4. 在“配置”选项卡上:

    • 将“允许自助服务设置”设置为“是”。 如果设置为 “无”,则用户无法使用 安全信息注册通行密钥,即使身份验证方法策略启用了通行密钥(FIDO2)。

    • 将“强制实施证明”设置为“是”或“否”

      在密钥 (FIDO2) 策略中启用证明时,Microsoft Entra ID 会尝试验证正在创建的密钥的合法性。 当用户在 Authenticator 中注册通行密钥时,认证会验证合法的 Authenticator 应用是否通过 Apple 和 Google 服务创建了该通行密钥。 下面是更多详细信息:

      • iOS:验证器证明使用 iOS 应用证明服务 ,以确保验证器应用的合法性,然后再注册通行密钥。

      • Android

        • 对于 Play 完整性证明,Authenticator 的证明功能将在注册通行密钥前使用 Play 完整性 API 来确保 Authenticator 应用的合法性。
        • 对于密钥证明,Authenticator 的证明功能将使用 Android 密钥证明来验证注册的通行密钥是否受硬件支持。

      注意

      对于 iOS 和 Android,Authenticator 的证明功能将依靠 Apple 和 Google 服务来验证 Authenticator 应用的真实性。 大量服务使用可能会使密钥注册失败,用户可能需要重试。 如果 Apple 和 Google 服务关闭,Authenticator 证明功能会阻止需要证明的注册活动,直到相应服务恢复为止。 若要监视 Google Play 完整性服务的状态,请参阅 Google Play 状态仪表板。 若要监视 iOS 应用证明服务的状态,请参阅系统状态

    注意

    用户只能在 Authenticator 应用中直接注册经证明的密钥。 跨设备注册流不支持注册经过证明的密钥。

    • 密钥限制 设置注册和身份验证的特定密钥的可用性。 可以将“强制实施密钥限制”设置为“否”,以允许用户注册任何受支持的通行密钥,包括直接在 Authenticator 应用中进行通行密钥注册。 如果将 “强制实施密钥限制 ”设置为 “是 ”且已具有有效的密钥用法,则应收集和添加当前使用的密钥的 AAGUID。

      如果将 限制特定密钥 设置为 允许,请选择 Microsoft Authenticator,以便自动将 Authenticator 应用的 AAGUID 添加到密钥限制列表中。 你还可以手动添加以下 AAGUID,使用户能够通过登录 Authenticator 应用或通过浏览“安全信息”上的引导流程,在 Authenticator 中注册通行密钥:

      • 适用于 Android 的 Authenticator:de1e552d-db1d-4423-a619-566b625cdc84
      • 适用于 iOS 的 Authenticator:90a3ccdf-635c-4729-a248-9b709135078f

      如果更改密钥限制,并移除以前允许的 AAGUID,那么以前注册允许方法的用户无法再使用该方法来进行登录。

      注意

      如果关闭密钥限制,请确保清除“Microsoft Authenticator”复选框,以便不会提示用户在 Authenticator 应用的安全信息中设置通行密钥

    显示启用 Authenticator 通行密钥的屏幕截图。

  5. 完成配置后,选择“保存”

    如果在尝试保存时看到错误,请在一个操作中将多个组替换为单个组,然后再次选择 保存

使用 Graph 资源管理器在 Authenticator 中启用通行密钥

除了使用 Microsoft Entra 管理中心之外,还可以使用 Graph 浏览器启用 Authenticator 通行密钥。 如果你至少分配有身份验证策略管理员角色,则可以更新身份验证方法策略,以允许使用 Authenticator 的 AAGUID。

若要使用 Graph 浏览器配置策略,请执行以下操作:

  1. 登录到 Graph 浏览器,并同意授予“Policy.Read.All”和“Policy.ReadWrite.AuthenticationMethod”权限

  2. 检索身份验证方法策略:

    GET https://graph.microsoft.com/v1.0/authenticationMethodsPolicy/authenticationMethodConfigurations/FIDO2
    
  3. 若要禁用证明强制实施,并强制实施密钥限制以仅允许使用 Authenticator 的 AAGUID,请使用以下请求正文执行 PATCH 操作:

    PATCH https://graph.microsoft.com/v1.0/authenticationMethodsPolicy/authenticationMethodConfigurations/FIDO2
    
    Request Body:
    {
        "@odata.type": "#microsoft.graph.fido2AuthenticationMethodConfiguration",
        "isAttestationEnforced": true,
        "keyRestrictions": {
            "isEnforced": true,
            "enforcementType": "allow",
            "aaGuids": [
                "90a3ccdf-635c-4729-a248-9b709135078f",
                "de1e552d-db1d-4423-a619-566b625cdc84"
    
                <insert previous AAGUIDs here to keep them stored in policy>
            ]
        }
    }
    
  4. 确保正确更新通行密钥 (FIDO2) 策略。

    GET https://graph.microsoft.com/v1.0/authenticationMethodsPolicy/authenticationMethodConfigurations/FIDO2
    

查找 AAGUID

使用 GetRegisteredPasskeyAAGUIDsForAllUsers.ps1 Microsoft Graph PowerShell 脚本枚举租户中所有已注册通行密钥的 AAGUID。

将此脚本的正文保存到名为 GetRegisteredPasskeyAAGUIDsForAllUsers.ps1的文件。

# Disconnect from Microsoft Graph
Disconnect-MgGraph

# Connect to Microsoft Graph with required scopes
Connect-MgGraph -Scope 'User.Read,UserAuthenticationMethod.Read,UserAuthenticationMethod.Read.All'

# Define the output file [If the script is run more than once, delete the file to avoid appending to it.]
$file = ".\AAGUIDs.txt"

# Initialize the file with a header
Set-Content -Path $file -Value '---'

# Retrieve all users
$UserArray = Get-MgBetaUser -All

# Iterate through each user
foreach ($user in $UserArray) {
    # Retrieve Passkey authentication methods for the user
    $fidos = Get-MgBetaUserAuthenticationFido2Method -UserId $user.Id

    if ($fidos -eq $null) {
        # Log and write to file if no Passkey methods are found
        Write-Host "User object ID $($user.Id) has no Passkey"
        Add-Content -Path $file -Value "User object ID $($user.Id) has no Passkey"
    } else {
        # Iterate through each Passkey method
        foreach ($fido in $fidos) {
            # Log and write to file the Passkey details
            Write-Host "- User object ID $($user.Id) has a Passkey with AAGUID $($fido.Aaguid) of Model type '$($fido.Model)'"
            Add-Content -Path $file -Value "- User object ID $($user.Id) has a Passkey with AAGUID $($fido.Aaguid) of Model type '$($fido.Model)'"
        }
    }

    # Log and write a separator to file
    Write-Host "==="
    Add-Content -Path $file -Value "==="
}

限制蓝牙的使用,使其仅支持 Authenticator 中的通行密钥

某些组织会限制蓝牙的使用,其中包括使用通行密钥。 在这种情况下,组织可以通过仅允许蓝牙与已启用通行密钥的 FIDO2 验证器进行配对来允许通行密钥。 有关如何仅针对通行密钥配置蓝牙使用的详细信息,请参阅蓝牙受限环境中的通行密钥

删除通行密钥

如果用户删除 Authenticator 中的通行密钥,则该通行密钥也会从用户的登录方法中移除。 身份验证策略管理员还可以按照以下步骤从用户的身份验证方法中删除通行密钥,但不会从 Authenticator 中删除通行密钥。

  1. 登录到 Microsoft Entra 管理中心并搜索必须删除其通行密钥的用户。

  2. 选择 身份验证方法,右键单击 Passkey,然后选择 删除

    除非用户在 Authenticator 中自行启动了通行密钥删除,否则他们还需要在其设备上移除 Authenticator 中的通行密钥。

在 Authenticator 中强制使用通行密钥登录

若要让用户在访问敏感资源时使用通行密钥登录,请使用内置的防钓鱼身份验证强度,或者执行以下步骤来创建自定义身份验证强度:

  1. 以条件访问管理员身份登录到 Microsoft Entra 管理中心

  2. 浏览至 Entra ID>身份验证方法>身份验证强度

  3. 选择“新建身份验证强度”。

  4. 为您的新身份验证强度提供一个描述性名称。

  5. (可选)提供说明。

  6. 选择 密码(FIDO2),然后选择 高级选项

  7. 选择防网络钓鱼 MFA 强度,或为 Authenticator 中的通行密钥添加 AAGUID:

    • 适用于 Android 的 Authenticator:de1e552d-db1d-4423-a619-566b625cdc84
    • 适用于 iOS 的 Authenticator:90a3ccdf-635c-4729-a248-9b709135078f
  8. 选择 下一步,并查看策略配置。