当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 实施混合现代身份验证后 Outlook 需要密码

作者:精品下载站 日期:2024-12-14 03:26:01 浏览:14 分类:玩电脑

实施混合现代身份验证后 Outlook 需要密码


混合现代身份验证 (HMA) 在本地组织中实施。这样,拥有本地邮箱的用户将使用新式身份验证而不是基本身份验证。这很棒,因为从现在开始,他们将使用 Microsoft Entra 条件访问策略。其中一项策略是多重身份验证 (MFA)。

实施 HMA 后,用户无法连接到 Outlook。有些用户看到 Outlook 要求输入密码,有些用户会收到新式身份验证登录提示。他们使用凭据登录后,会显示错误。在本文中,您将了解发生这种情况的原因,以及 Outlook 的解决方案在配置混合现代身份验证后要求输入密码。

怎么了?

我们有用户 Amanda,它有一个本地邮箱。她可以登录 Outlook,然后邮件就会显示。通过基本身份验证,一切都运行良好。但是,配置混合现代身份验证并重新启动 Outlook 后,Outlook 显示它需要密码

[玩转系统] 实施混合现代身份验证后 Outlook 需要密码

让我们为 Amanda 删除并创建一个新的 Outlook 配置文件。执行此操作后,我们收到错误:CAA2000B

[玩转系统] 实施混合现代身份验证后 Outlook 需要密码

出了点问题
我们无法让您登录。如果此错误仍然存在,请与您的系统管理员联系并提供错误代码 CAA2000B。

其他问题信息

错误代码:CAA200B相关 ID:54cba1ee-6cf8-4382-8e24-b8d7028182a4
时间戳:2021-07-10T17:45:57Z
更多信息:https://www.microsoft.com/wamerrors
服务器消息:AADSTS500011:在名为 exoip.com 的租户中找不到名为 http://autodiscover.exoip.com/ 的资源主体。如果应用程序尚未由租户管理员安装或未得到租户中任何用户的同意,则可能会发生这种情况。您可能已将身份验证请求发送给了错误的租户。

为什么我们会看到错误代码 CAA2000B,并且为什么显示 Outlook 需要密码?配置混合现代身份验证后,这些问题的解决方案是什么?

Outlook 的解决方案在实施混合现代身份验证后需要密码

解决方案是获取 Exchange 虚拟目录 URL。之后,将本地 Web 服务 URL 添加为 SPN(服务主体名称)。让我们看看如何做到这一点。

步骤 1. 获取虚拟目录 URL

在本地 Exchange Server 上以管理员身份启动 Exchange 命令行管理程序。运行四个 cmdlet 来检索虚拟目录 URL。

Get-MapiVirtualDirectory | fl server,*url*
Get-WebServicesVirtualDirectory | fl server,*url*
Get-ClientAccessServer | fl Name, AutodiscoverServiceInternalUri
Get-OABVirtualDirectory | fl server,*url*

运行每个命令后,结果将显示在下面的输出中。记下所有内部和外部 URL,因为您需要在后续步骤之一中添加这些 URL。

在我们的示例中,内部和外部 URL 具有相同的名称。我们建议像这样配置它,因为它会简化很多。如果没有,您会在输出中看到以 .local 或 .lan 结尾的内部地址。

# Get-MapiVirtualDirectory | fl server,*url*

Server      : EX01-2016
InternalUrl : https://mail.exoip.com/mapi
ExternalUrl : https://mail.exoip.com/mapi

Server      : EX02-2016
InternalUrl : https://mail.exoip.com/mapi
ExternalUrl : https://mail.exoip.com/mapi

# Get-WebServicesVirtualDirectory | fl server,*url*

Server               : EX01-2016
InternalNLBBypassUrl :
InternalUrl          : https://mail.exoip.com/EWS/Exchange.asmx
ExternalUrl          : https://mail.exoip.com/EWS/Exchange.asmx

Server               : EX02-2016
InternalNLBBypassUrl :
InternalUrl          : https://mail.exoip.com/EWS/Exchange.asmx
ExternalUrl          : https://mail.exoip.com/EWS/Exchange.asmx

# Get-ClientAccessServer | fl Name, AutodiscoverServiceInternalUri

WARNING:  The Get-ClientAccessServer cmdlet will be removed in a future version of Exchange. Use the
Get-ClientAccessService cmdlet instead. If you have any scripts that use the Get-ClientAccessServer cmdlet, update them
to use the Get-ClientAccessService cmdlet.  For more information, see http://go.microsoft.com/fwlink/p/?LinkId=254711.

Name                           : EX01-2016
AutoDiscoverServiceInternalUri : https://autodiscover.exoip.com/Autodiscover/Autodiscover.xml

Name                           : EX02-2016
AutoDiscoverServiceInternalUri : https://autodiscover.exoip.com/Autodiscover/Autodiscover.xml

# Get-OABVirtualDirectory | fl server,*url*

Server      : EX01-2016
InternalUrl : https://mail.exoip.com/OAB
ExternalUrl : https://mail.exoip.com/OAB

Server      : EX02-2016
InternalUrl : https://mail.exoip.com/OAB
ExternalUrl : https://mail.exoip.com/OAB

步骤 2. 获取与 Exchange 相关的 SPN

以管理员身份运行 PowerShell 并连接到 Microsoft Graph PowerShell。使用您的 Microsoft 365 全局管理员凭据登录。

Connect-MgGraph -Scopes "Application.Read.All", "Application.ReadWrite.All"

运行 Get-MgServicePrincipal cmdlet 以获取云中应用程序 00000002-0000-0ff1-ce00-000000000000 的 Exchange 相关 URL。

Get-MgServicePrincipal -Filter "AppId eq '00000002-0000-0ff1-ce00-000000000000'" | select -ExpandProperty ServicePrincipalNames

记下(以及用于稍后比较的屏幕截图)此命令的输出,其中应包括 https://autodiscover.yourdomain.com 和 https://mail.yourdomain.com URL,但主要由以 00000002 开头的 SPN 组成-0000-0ff1-ce00-000000000000/。

00000002-0000-0ff1-ce00-000000000000/mail.exoip.com
00000002-0000-0ff1-ce00-000000000000/autodiscover.M365x877334.mail.onmicrosoft.com
00000002-0000-0ff1-ce00-000000000000/M365x877334.mail.onmicrosoft.com
00000002-0000-0ff1-ce00-000000000000/autodiscover.exoip.com
00000002-0000-0ff1-ce00-000000000000/exoip.com
00000002-0000-0ff1-ce00-000000000000/autodiscover.exoip.local
00000002-0000-0ff1-ce00-000000000000/exoip.local
00000002-0000-0ff1-ce00-000000000000/outlook.office365.com
00000002-0000-0ff1-ce00-000000000000/mail.office365.com
00000002-0000-0ff1-ce00-000000000000/outlook.com
00000002-0000-0ff1-ce00-000000000000/*.outlook.com
00000002-0000-0ff1-ce00-000000000000
https://ps.compliance.protection.outlook.com
https://outlook-sdf.office.com/
https://outlook-sdf.office365.com/
https://outlook.office365.com:443/
https://outlook.office.com/
https://outlook.office365.com/
https://outlook.com/
https://ps.protection.outlook.com/
https://outlook-tdf.office.com/
https://outlook-tdf-2.office.com/
https://ps.outlook.com

最有可能的是,您本地的 https:// URL 丢失。因此,我们需要在下一步中将这些特定记录添加到此列表中。

步骤 3. 将本地 Web 服务 URL 添加为 SPN

如果在此列表中没有看到内部和外部 MAPI/HTTP、EWS、ActiveSync、OAB 和自动发现记录,则必须在 Microsoft Graph PowerShell 中使用以下命令添加它们。

在此示例中,URL 为 https://mail.exoip.com/https://autodiscover.exoip.com/。将 URL 替换为您自己的 URL。

$x = Get-MgServicePrincipal -Filter "AppId eq '00000002-0000-0ff1-ce00-000000000000'"
$x.ServicePrincipalNames += "https://mail.exoip.com/"
$x.ServicePrincipalNames += "https://autodiscover.exoip.com/"
Update-MgServicePrincipal -ServicePrincipalId $x.Id -ServicePrincipalNames $x.ServicePrincipalNames

步骤 4. 验证 Exchange 相关 SPN

通过在 Microsoft Graph PowerShell 中运行 Get-MgServicePrincipal cmdlet 验证是否添加了新记录。

Get-MgServicePrincipal -Filter "AppId eq '00000002-0000-0ff1-ce00-000000000000'" | select -ExpandProperty ServicePrincipalNames

查看输出。将之前的列表/屏幕截图与新的 SPN 列表进行比较。您还可以截取新列表的屏幕截图以供记录。如果成功,您将在列表中看到两个新 URL。

按照我们的示例,SPN 列表现在将包括特定 URL https://mail.exoip.com/https://autodiscover.exoip.com/ 。在列表顶部查看它。

https://autodiscover.exoip.com/
https://mail.exoip.com/
00000002-0000-0ff1-ce00-000000000000/mail.exoip.com
00000002-0000-0ff1-ce00-000000000000/autodiscover.M365x877334.mail.onmicrosoft.com
00000002-0000-0ff1-ce00-000000000000/M365x877334.mail.onmicrosoft.com
00000002-0000-0ff1-ce00-000000000000/autodiscover.exoip.com
00000002-0000-0ff1-ce00-000000000000/exoip.com
00000002-0000-0ff1-ce00-000000000000/autodiscover.exoip.local
00000002-0000-0ff1-ce00-000000000000/exoip.local
00000002-0000-0ff1-ce00-000000000000/outlook.office365.com
00000002-0000-0ff1-ce00-000000000000/mail.office365.com
00000002-0000-0ff1-ce00-000000000000/outlook.com
00000002-0000-0ff1-ce00-000000000000/*.outlook.com
00000002-0000-0ff1-ce00-000000000000
https://ps.compliance.protection.outlook.com
https://outlook-sdf.office.com/
https://outlook-sdf.office365.com/
https://outlook.office365.com:443/
https://outlook.office.com/
https://outlook.office365.com/
https://outlook.com/
https://ps.protection.outlook.com/
https://outlook-tdf.office.com/
https://outlook-tdf-2.office.com/
https://ps.outlook.com

验证您的工作

重新启动 Outlook,您将在底部栏中看到它连接到:Microsoft Exchange

[玩转系统] 实施混合现代身份验证后 Outlook 需要密码

就是这样!

如果这对您不起作用,则可能是您在配置混合现代身份验证时未正确设置其他配置。我们建议您阅读在本地 Exchange 中配置混合现代身份验证一文。它逐步解释了如何实施混合现代身份验证的每个细节。

结论

您了解了为什么 Outlook 在实施混合现代身份验证后显示消息需要密码。首先,获取 Exchange 本地虚拟目录 URL。之后,将虚拟目录 URL 添加为 SPN。最后,重新启动 Outlook,就会显示已连接到 Microsoft Exchange。

您喜欢这篇文章吗?您可能还喜欢迁移到 Office 365 后 Outlook 提示输入密码。不要忘记关注我们并分享这篇文章。

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯