将混合新式验证用于 Outlook for iOS 和 Outlook for Android

适用于 iOS 和 Android 的 Outlook 应用设计为使用 Microsoft 服务在移动设备上体验 Microsoft 365 或Office 365的最佳方式,可帮助查找、计划和确定日常生活和工作的优先级。 Outlook 提供所需的安全性、隐私和支持,同时通过Microsoft Entra条件访问和 Intune 应用保护策略等功能保护公司数据。 The following sections provide an overview of the hybrid Modern Authentication architecture, the required pre-requisites for its deployment, and how to securely deploy Outlook for iOS and Android for Exchange on-premises mailboxes.

Microsoft Cloud architecture for hybrid Exchange Server customers

Outlook for iOS and Android is a cloud-backed application. 此特征表示你的体验包括由 Microsoft 云中运行的安全且可缩放的服务提供支持的本地安装应用。

对于Exchange Server邮箱,Outlook for iOS 和 Android 的体系结构直接内置于 Microsoft 云中,为客户提供更多优势,例如安全性、隐私、内置合规性和 Microsoft 承诺在 Microsoft 信任中心和Azure 信任中心进行的透明操作。

Outlook for iOS 和 Android 中的混合新式身份验证。

在基于 Microsoft 365 或 Office 365 的体系结构中,Outlook for iOS 和 Android 使用本机 Microsoft 同步技术进行数据同步,该技术在 Microsoft 365 或 Office 365 与应用之间端到端受到 TLS 保护的连接保护。

Exchange ActiveSync (EAS) Exchange Online与本地环境之间的连接可实现用户的本地数据的同步,并在Exchange Online租户中包含四周的电子邮件、所有日历数据、所有联系人数据和外出状态。 在 Microsoft Entra ID 中删除帐户 30 天后,将从 Exchange Online 自动删除此数据。

Data synchronization between the on-premises environment and Exchange Online happens independent of user behavior. 这种独立性可确保我们可以快速向设备发送新消息。

Processing information in the Microsoft Cloud enables advanced features and capabilities, such as the categorization of email for the Focused Inbox, customized experience for travel and calendar, and improved search speed. Relying on the cloud for intensive processing and minimizing the resources required from users' devices enhances the app's performance and stability. 最后,它允许 Outlook 构建跨所有电子邮件帐户运行的功能,而不管基础服务器 (的技术功能,例如不同版本的 Exchange Server、Microsoft 365 或 Office 365) 。

Specifically, this new architecture has the following improvements:

  1. 企业移动性 + 安全性支持:客户可以利用 Microsoft 企业移动性 + 安全性 (EMS) 包括Microsoft Intune和Microsoft Entra IDP1 或 P2,用于启用条件访问和 Intune 应用保护策略,用于控制和保护移动设备上的公司消息传递数据。

  2. 完全由 Microsoft 云提供支持:本地邮箱数据同步到 Exchange Online,这提供了 Microsoft 承诺在 Microsoft 信任中心内实施的安全性、隐私性、合规性和透明操作的优势。

  3. OAuth 保护用户的密码:Outlook 使用混合新式身份验证 (OAuth) 来保护用户的凭据。 Hybrid Modern Authentication provides Outlook with a secure mechanism to access the Exchange data without ever touching or storing a user's credentials. 登录时,用户直接针对标识平台 (Microsoft Entra ID或本地标识提供者(如 ADFS) )进行身份验证,并接收访问令牌作为回报,该令牌授予 Outlook 对用户邮箱或文件的访问权限。 服务在任何时间点都无法访问用户的密码。

  4. Provides Unique Device IDs: Each Outlook connection is uniquely registered in Microsoft Intune and can therefore be managed as a unique connection.

  5. 解锁 iOS 和 Android 上的新功能:此更新使 Outlook 应用能够利用本地 Exchange 目前不支持的本机 Microsoft 365 或Office 365功能,例如使用完整Exchange Online搜索和重点收件箱。 These features will only be available when using Outlook for iOS and Android.

注意

无法通过本地 Exchange 管理中心 (EAC) 进行设备管理。 Intune is required to manage mobile devices.

Data security, access, and auditing controls

With on-premises data being synchronized with Exchange Online, customers have questions about how the data is protected in Exchange Online. Microsoft 云中的加密 讨论如何使用 BitLocker 进行卷级加密。 Outlook for iOS 和 Android 体系结构支持使用 Microsoft Purview 客户密钥进行服务加密,但请注意,用户必须具有Office 365 企业版 E5 许可证 (或政府或教育) 的相应版本的计划,才能使用 set-mailuser cmdlet 分配加密策略。

默认情况下,Microsoft 工程师对 Microsoft 365 或 Office 365 中的客户内容没有长期管理权限和零长期访问权限。 管理访问控制 讨论人员筛选、背景检查、密码箱和客户密码箱等。

ISO 针对服务保障的审核控制文档提供了 Microsoft 365 和 Office 365 已实施的全球信息安全标准和法规的审核控制的状态。

Connection flow

When Outlook for iOS and Android is enabled with hybrid Modern Authentication, the connection flow is as follows.

混合新式身份验证中的身份验证流。

  1. After the user enters their email address, Outlook for iOS and Android connects to the AutoDetect service. AutoDetect 通过启动自动发现查询Exchange Online来确定邮箱类型。 Exchange Online determines that the user's mailbox is on-premises and returns a 302-redirect to AutoDetect with the on-premises Autodiscover URL. AutoDetect 针对本地自动发现服务启动查询,以确定电子邮件地址的 ActiveSync 终结点。 尝试在本地的 URL 类似于此示例: <https://autodiscover.contoso.com/autodiscover/autodiscover.json?Email=test%40contoso.com&Protocol=activesync&RedirectCount=3>

  2. AutoDetect 使用空持有者质询启动与上述步骤 1 中返回的本地 ActiveSync URL 的连接。 The empty bearer challenge tells the on-premises ActiveSync that the client supports Modern Authentication. 本地 ActiveSync 使用 401 质询响应进行响应,并包括 WWW-Authenticate: Bearer 标头。 在 WWW-Authenticate: Bearer 标头中,authorization_uri值标识应用于获取 OAuth 令牌的Microsoft Entra终结点。

  3. AutoDetect 将Microsoft Entra终结点返回到客户端。 The client begins the log-in flow and the user is presented with a Web form (or redirected to the Microsoft Authenticator app) and can enter credentials. 根据标识配置,此过程可能涉及也可能不涉及联合终结点重定向到本地标识提供者。 Ultimately, the client obtains an access-and-refresh token pair, which is named AT1/RT1. This access token is scoped to the Outlook for iOS and Android client with an audience of the Exchange Online endpoint.

  4. Outlook for iOS 和 Android 与 Exchange Online 建立连接,并发出一个预配请求,其中包括用户的访问令牌 (AT1) 和本地 ActiveSync 终结点。

  5. Exchange Online中的 MRS 预配 API 使用 AT1 作为输入,并获取名为 AT2/RT2 () 的第二个访问和刷新令牌对,以便通过代理调用 Active Directory 来访问本地邮箱。 This second access token is scoped with the client being Exchange Online and an audience of the on-premises ActiveSync namespace endpoint.

  6. 如果未预配邮箱,则预配 API 会创建邮箱。

  7. The MRS provisioning API establishes a secure connection to the on-premises ActiveSync endpoint and synchronizes the user's messaging data using the AT2 access token as the authentication mechanism. RT2 is used periodically to generate a new AT2 so that data can be synchronized in the background without user intervention.

  8. 数据返回给客户端。

Technical and licensing requirements

The hybrid Modern Authentication architecture has the following technical requirements:

注意

Office 365美国政府社区和国防租户、Office 365德国租户以及由世纪互联租户运营的中国Office 365,不支持将混合新式身份验证与 Outlook 移动版结合使用的本地帐户。

  1. Exchange on-premises setup:

    • Exchange Server 2019 累积更新 1 (CU1) 或更高版本、Exchange Server 2016 累积更新 8 (CU8) 或更高版本,或者所有 Exchange 服务器上Exchange Server 2013 CU19 或更高版本。 在 (本地 Exchange 和Exchange Online) 的混合部署中,或者在将 Exchange Online Archiving (EOA) 与本地 Exchange 部署配合使用的组织中,需要部署最新的 CU 或先于最新 CU 的一个 CU。

    • All Exchange 2007 or Exchange 2010 servers must be removed from the environment. 这些版本的 Exchange 不受主流支持,不适用于 Intune 管理的 Outlook for iOS 和 Android。 In this architecture, Outlook for iOS and Android uses OAuth as the authentication mechanism. 发生的本地配置更改之一使 Microsoft 云的 OAuth 终结点成为默认授权终结点。 When this change is made, clients can start negotiating the use of OAuth. 由于此更改涉及整个组织,因此 Exchange 2013 或 2016 前面的 Exchange 2010 邮箱会错误地认为它们可以执行 OAuth,并且最终会处于断开连接状态,因为 Exchange 2010 不支持 OAuth 作为身份验证机制。

  2. Active Directory Synchronization. 通过 Microsoft Entra Connect 将整个本地邮件收件人目录与Microsoft Entra ID的 Active Directory 同步。 如果在 Microsoft Entra Connect 配置中启用了Microsoft Entra应用和属性筛选,请确保选择以下应用程序:

    • Office 365 ProPlus
    • Exchange Online
    • Azure RMS
    • Intune

    如果未在 Microsoft Entra Connect 配置中启用Microsoft Entra应用和属性筛选,则默认情况下已选择所有必需的应用程序。

    重要

    Outlook for iOS 和 Android 对利用混合新式身份验证的本地邮箱使用租户Exchange Online全局地址列表。 如果所有邮件收件人未同步到Microsoft Entra ID,用户将遇到邮件流问题。

  3. Exchange hybrid setup: Requires full hybrid relationship between Exchange on-premises with Exchange Online.

    • 混合 Microsoft 365 或 Office 365 组织使用 Exchange 经典混合拓扑模式在完全混合配置中配置,并按 Exchange 部署助手中的指定进行设置。

      注意

      混合 代理不支持混合新式身份验证。

    • 需要 Microsoft 365 或 Office 365 企业版、商业或教育组织。

    • 本地邮箱数据在设置 Microsoft 365 或 Office 365 组织的同一数据中心区域中同步,或同步到帐户的 PreferredDataLocation 中定义的数据中心区域。 有关 Microsoft 365 和Office 365数据所在位置的详细信息,请访问 Microsoft 信任中心。 有关 PreferredDataLocation 的详细信息,请参阅 多地理位置功能

    • Exchange ActiveSync和自动发现的外部 URL 主机名必须作为服务主体发布,以便通过混合配置向导Microsoft Entra ID。

    • AutoDiscover and Exchange ActiveSync namespaces must be accessible from the Internet and cannot be fronted by a pre-authentication solution.

    • 确保负载均衡器和 Exchange 服务器之间未使用 SSL 或 TLS 卸载,因为此设置会影响 OAuth 令牌的使用。 SSL and TLS bridging (termination and re-encryption) is supported.

  4. Intune 设置:) 不支持 Microsoft 365 的 Intune 独立部署和共同管理部署 (基本移动性和安全性。

  5. Microsoft 365 和 Office 365 许可

    • Outlook for iOS 和 Android 版在 iOS 应用商店和 Google Play 中免费供消费者使用。 但是,商业用户需要 Microsoft 365 或 Office 365 订阅,其中包括 Office 桌面应用程序:Microsoft 365 应用版 for Business、Microsoft 365 商业标准版、Microsoft 365 企业应用版、Office 365 企业版 E3、Office 365 企业版 E5 或相应版本的政府或教育计划。 允许具有以下订阅的商业用户在集成屏幕对角线为 10.1 英寸或更小的设备上使用 Outlook 移动应用:Office 365 企业版 E1、Office 365 F1、Office 365 A1、Microsoft 365 商业基础版,并且只有在没有 Office) 的情况下Exchange Online许可证 (。 如果只有 Exchange 本地 (Exchange Server) 许可证,则你无权使用该应用。
    • 使用高级Exchange Online功能 (,例如,使用客户密钥的服务加密多地理位置功能) 要求在Microsoft 365 管理中心内为本地用户分配适用的Office 365或 Microsoft 365 订阅许可证。

    有关如何分配许可证的详细信息,请参阅 单独或批量添加用户

  6. EMS licensing: Each on-premises user must have one of the following licenses:

    • Intune 独立 + Microsoft Entra ID P1、P2 或 Microsoft Entra ID P1 或 P2
    • Enterprise Mobility + Security E3, Enterprise Mobility + Security E5

Implementation steps

Enabling support for hybrid Modern Authentication in your organization requires each of the following steps, which are detailed in the following sections:

  1. Create a conditional access policy
  2. Create an Intune app protection policy
  3. Enable hybrid Modern Authentication

创建条件访问策略

When an organization decides to standardize how users access Exchange data, using Outlook for iOS and Android as the only email app for end users, they can configure a conditional access policy that blocks other mobile access methods. Outlook for iOS 和 Android 通过Microsoft Entra标识对象进行身份验证,然后连接到Exchange Online。 因此,需要创建Microsoft Entra条件访问策略,以将移动设备连接限制为Exchange Online。 若要执行此任务,需要两个条件访问策略,每个策略都面向所有潜在用户。 有关创建这些策略的详细信息,请参阅 条件访问:需要批准的客户端应用或应用保护策略

  1. 按照要求使用 移动设备的已批准的客户端应用或应用保护策略中的步骤操作。 此策略允许 Outlook for iOS 和 Android,但阻止支持 OAuth 和基本身份验证Exchange ActiveSync移动客户端连接到Exchange Online。

    注意

    此策略可确保移动用户使用适用的应用访问所有 Office 终结点。

  2. 按照阻止所有设备上的Exchange ActiveSync中的步骤操作,这会阻止在非移动设备上使用基本身份验证的Exchange ActiveSync客户端连接到Exchange Online。

    上述策略使用授权控件 “需要应用保护策略”,该策略确保在授予访问权限之前将 Intune 应用保护策略应用于 Outlook for iOS 和 Android 中的关联帐户。 如果用户未分配到 Intune 应用保护策略,未获得 Intune 的许可,或者该应用未包含在 Intune 应用保护策略中,则该策略将阻止用户获取访问令牌并获取对消息传递数据的访问权限。

  3. 最后,遵循使用Microsoft Entra条件访问阻止旧身份验证以阻止 iOS 和 Android 设备上的其他 Exchange 协议的旧身份验证;此策略应仅面向 Microsoft 365 或Office 365 Exchange Online云应用以及 iOS 和 Android 设备平台。 此方法可确保使用具有基本身份验证的 Exchange Web Services、IMAP4 或 POP3 协议的移动应用无法连接到Exchange Online。

重要

To leverage app-based conditional access policies, the Microsoft Authenticator app must be installed on iOS devices. 对于 Android 设备,需要 Intune 公司门户应用。 For more information, see App-based conditional access with Intune.

若要阻止其他移动设备客户端 ((例如移动操作系统中包含的本机邮件客户端),) 连接到本地环境, (通过基本身份验证对本地 Active Directory) 进行身份验证:

可以通过在 Exchange 命令行管理程序中设置以下命令,使用内置的 Exchange 移动设备访问规则并阻止所有移动设备进行连接:

Set-ActiveSyncOrganizationSettings -DefaultAccessLevel Block

注意

实现上述本地 cmdlet 时,请注意,它可能会影响用户使用移动设备连接到本地 Exchange。

Create an Intune app protection policy

启用混合新式身份验证后,所有本地移动用户都可以通过 Microsoft 365 或基于 Office 365 的体系结构使用 Outlook for iOS 和 Android。 Therefore, it's important to protect corporate data with an Intune app protection policy.

Create Intune app protection policies for both iOS and Android using the steps documented in How to create and assign app protection policies. 每个策略至少必须满足以下条件:

  1. 它们包括所有 Microsoft 移动应用程序,如 Word、Excel 或 PowerPoint,因为此包含将确保用户可以以安全的方式访问和操作任何 Microsoft 应用中的公司数据。

  2. They mimic the security features that Exchange provides for mobile devices, including:

    • Requiring a PIN for access (which includes Select Type, PIN length, Allow Simple PIN, Allow fingerprint)
    • Encrypting app data
    • Blocking managed apps from running on "jailbroken" and rooted devices
  3. 它们将分配给所有用户。 这种广泛的分配可确保所有用户都受到保护,无论他们是否使用 Outlook for iOS 和 Android。

除了上述最低策略要求外,还应考虑部署高级保护策略设置 ,例如限制与其他应用一起剪切、复制和粘贴, 以进一步防止公司数据泄露。 For more information on the available settings, see Android app protection policy settings in Microsoft Intune and iOS app protection policy settings.

重要

To apply Intune app protection policies against apps on Android devices that are not enrolled in Intune, the user must also install the Intune Company Portal. 有关详细信息,请参阅 Microsoft Intune 中的 Android 应用保护策略设置

Enable hybrid Modern Authentication

  1. 如果尚未启用混合新式身份验证,请查看混合新式身份验证概述中所述的先决条件,以及在本地Skype for Business和 Exchange 服务器上使用它的先决条件。 完成先决条件后,执行如何配置本地Exchange Server以使用混合新式身份验证中的步骤。

  2. 创建 Exchange 本地设备访问允许规则,以允许Exchange Online使用 ActiveSync 协议连接到本地环境:

    If ((Get-ActiveSyncOrganizationSettings).DefaultAccessLevel -ne "Allow") {New-ActiveSyncDeviceAccessRule -Characteristic DeviceType -QueryString "OutlookService" -AccessLevel Allow}
    

    注意

    无法通过本地 Exchange 管理中心管理设备。 Intune is required to manage mobile devices.

  3. 创建 Exchange 本地设备访问规则,阻止用户使用 Outlook for iOS 和 Android 通过Exchange ActiveSync协议进行基本身份验证连接到本地环境:

    New-ActiveSyncDeviceAccessRule -Characteristic DeviceModel -QueryString "Outlook for iOS and Android" -AccessLevel Block
    

    注意

    创建此规则后,将阻止具有基本身份验证用户的 Outlook for iOS 和 Android。

  4. 确保本地Exchange ActiveSync maxRequestLength 配置为匹配传输配置的 MaxSendSize/MaxReceiveSize:

    • 路径: %ExchangeInstallPath%\FrontEnd\HttpProxy\Sync\web.config
    • 财产: maxRequestLength
    • 值:以 KB 大小 (10 MB 设置为 10240,例如)

Client features that aren't supported

将混合新式身份验证与 Outlook for iOS 和 Android 配合使用的本地邮箱不支持以下功能。

  • Draft folder and Draft messages synchronization
  • 使用邮件列表底部的“加载更多邮件”链接查看超过四周的电子邮件
  • 共享日历访问权限和委托日历访问权限
  • 共享和委托邮箱数据访问权限
  • Cortana 离开时间/旅行时间
  • 丰富的会议位置
  • 使用 Microsoft To Do 进行任务管理
  • 加载项
  • 趣味日历
  • 播放我的电子邮件
  • 敏感度标记
  • S/MIME

仅当本地基础结构使用 Exchange Server 2016 及更高版本时,才支持以下功能:

  • Calendar attachments

Connection Flow FAQ

Q: My organization has a security policy that requires Internet inbound connections to be restricted to approved IP addresses or FQDNs. 此体系结构是否可以进行这种配置?

A: Microsoft recommends that the on-premises endpoints for AutoDiscover and ActiveSync protocols be opened and accessible from the Internet without any restrictions. In certain situations that may not be possible. 例如,如果与另一个第三方统一终结点管理 (UEM) 解决方案共存,则可能需要对 ActiveSync 协议施加限制,以防止用户在迁移到 Intune 和 Outlook for iOS 和 Android 时绕过 UEM 解决方案。 If you must place restrictions on your on-premises firewall or gateway edge devices, Microsoft recommends filtering based on FQDN endpoints. If FQDN endpoints cannot be used, then filter on IP addresses. 请确保允许列表中包含以下 IP 子网和 FQDN:

:我的组织当前使用第三方 UEM 解决方案来控制移动设备连接。 如果我在 Internet 上公开Exchange ActiveSync命名空间,这为用户在共存期间绕过第三方 UEM 解决方案提供了一种方法。 如何防止这种情况?

A: There are three potential solutions to resolving this issue:

  1. Implement Exchange mobile device access rules to control which devices are approved to connect.
  2. 某些第三方 UEM 解决方案与 Exchange 移动设备访问规则集成,阻止未经批准的访问,同时在用户的 ActiveSyncAllowedDeviceIDs 属性中添加已批准的设备。
  3. Implement IP restrictions on the Exchange ActiveSync namespace.

:是否可以使用 Azure ExpressRoute 来管理 Microsoft 云与本地环境之间的流量?

A: Connectivity to the Microsoft Cloud requires Internet connectivity. Microsoft 建议将自动发现和Exchange ActiveSync直接公开到 Internet;有关详细信息,请参阅 Microsoft 365 和 Office 365 网络连接原则。 但是,Exchange 混合方案支持 Azure ExpressRoute。 有关详细信息,请参阅适用于 Microsoft 365 的 Azure ExpressRoute 和 Office 365

使用 ExpressRoute 时,ExpressRoute 连接没有专用 IP 空间,也不能有“专用”DNS 解析。 That means that any endpoint your company wants to use over ExpressRoute must resolve in public DNS. If that endpoint resolves to an IP that is contained in the advertised prefixes associated with the ExpressRoute circuit (your company must configure those prefixes in the Azure portal when you enable Microsoft peering on the ExpressRoute connection), then the outbound connection from Exchange Online to your on-premises environment will route through the ExpressRoute circuit. Your company will have to ensure that the return traffic associated with these connections goes through the ExpressRoute circuit (avoiding asymmetric routing).

重要

由于你的公司将 Exchange 自动发现和 ActiveSync 命名空间添加到 ExpressRoute 线路中播发的前缀,因此访问 Exchange 自动发现和 ActiveSync 终结点的唯一方法是通过 ExpressRoute。 换句话说,唯一能够通过自动发现和 ActiveSync 命名空间连接到本地的移动设备将是 Outlook for iOS 和 Android。 (的所有其他客户端(例如移动设备的本机邮件客户端) )将无法连接到本地环境,因为不会从 Microsoft 云建立连接。 这是因为在 ExpressRoute 线路上播发给 Microsoft 的公共 IP 空间与 Internet 线路上播发的公共 IP 空间 () 没有任何重叠。

:假设只有四周的邮件数据同步到Exchange Online,这是否意味着在 Outlook for iOS 和 Android 中执行的搜索查询无法返回本地设备上可用的数据以外的信息?

A: When a search query is performed in Outlook for iOS and Android, items that match the search query are returned if they are located on the device. In addition, the search query is passed to Exchange on-premises via Exchange Online. Exchange on-premises executes the search query against the on-premises mailbox and returns the results to Exchange Online, which relays the results to the client. The on-premises query results are stored in Exchange Online for one day before being deleted.

Q: How do I know that the email account is added correctly in Outlook for iOS and Android?

:通过混合新式身份验证添加的本地邮箱在 Outlook for iOS 和 Android 的帐户设置中标记为 Exchange (混合) ,类似于以下示例:

为混合新式身份验证配置的 Outlook for iOS 和 Android 帐户的示例。

Authentication FAQ

Q: What identity configurations are supported with hybrid Modern Authentication and Outlook for iOS and Android?

:混合新式身份验证支持以下具有 Microsoft Entra ID 的标识配置:

  • 与受 Microsoft Entra ID 支持的任何本地标识提供者的联合标识
  • 通过 Microsoft Entra Connect 进行密码哈希同步
  • 通过 Microsoft Entra Connect 进行直通身份验证

Q: What authentication mechanism is used for Outlook for iOS and Android? 凭据是存储在 Microsoft 365 还是Office 365中?

:请参阅 Exchange Online 中使用新式身份验证的帐户设置

Q: Do Outlook for iOS and Android and other Microsoft Office mobile apps support single sign-on?

:请参阅 Exchange Online 中使用新式身份验证的帐户设置

Q: What is the lifetime of the tokens generated and used by the Active Directory Authentication Library (ADAL) in Outlook for iOS and Android?

:请参阅 Exchange Online 中使用新式身份验证的帐户设置

Q: What happens to the access token when a user's password is changed?

:请参阅 Exchange Online 中使用新式身份验证的帐户设置

Q: Is there a way for a user to bypass AutoDetect when adding their account to Outlook for iOS and Android?

A: Yes, a user can bypass AutoDetect at any time and manually configure the connection using Basic authentication over the Exchange ActiveSync protocol. 为了确保用户不会通过不支持Microsoft Entra条件访问或 Intune 应用保护策略的机制与本地环境建立连接,本地 Exchange 管理员需要配置阻止 ActiveSync 连接的 Exchange 设备访问规则。 若要执行此任务,请在 Exchange 命令行管理程序中键入以下命令:

New-ActiveSyncDeviceAccessRule -Characteristic DeviceModel -QueryString "Outlook for iOS and Android" -AccessLevel Block

:当组织从使用 Outlook for iOS 和 Android 进行基本身份验证到混合新式身份验证时会发生什么情况?

:在组织按照上述 实现步骤启用混合新式身份验证后,最终用户需要在 Outlook for iOS 和 Android 中删除其现有帐户配置文件,因为配置文件使用基本身份验证。 然后,最终用户可以创建将使用混合新式身份验证的新配置文件。

疑难解答

Below are the most common issues or errors with on-premises mailboxes using hybrid Modern Authentication with Outlook for iOS and Android.

AutoDiscover and ActiveSync

在配置文件创建期间,应向用户显示类似于以下屏幕截图中的新式身份验证对话框:

成功设置混合新式身份验证期间,用户应看到的对话框。

如果向用户显示以下对话框之一,则自动发现或 ActiveSync 本地终结点存在问题。

下面是向用户展示旧版基本身份验证Exchange ActiveSync体验的示例:

一个对话框,指示用户正在使用旧版基本身份验证Exchange ActiveSync体验。

And here's an example of what users see when AutoDetect isn't able to discover the configuration for users' on-premises mailboxes.

当 AutoDetect 无法发现其本地邮箱的配置时,用户会看到该对话框。

In either scenario, verify that your on-premises environment is correctly configured. 若要执行此任务:从 TechNet 库下载并执行用于 验证适用于 iOS 和 Android 的 Outlook 混合新式身份验证设置的脚本。

查看脚本的输出时,应会看到自动发现的以下输出:

{
    "Protocol": "activesync",
    "Url": "https://mail.contoso.com/Microsoft-Server-ActiveSync"
}

The on-premises ActiveSync endpoint should return the following response, where the WWW-Authenticate header includes an authorization_uri:

Content-Length →0
Date →Mon, 29 Jan 2018 19:51:46 GMT
Server →Microsoft-IIS/10.0 Microsoft-HTTPAPI/2.0
WWW-Authenticate →Bearer client_id="00000002-0000-0ff1-ce00-000000000000", trusted_issuers="00000001-0000-0000-c000-000000000000@5de110f8-2e0f-4d45-891d-bcf2218e253d,00000004-0000-0ff1-ce00-000000000000@contoso.com", token_types="app_asserted_user_v1 service_asserted_app_v1", authorization_uri="https://login.windows.net/common/oauth2/authorize"
Www-Authenticate →Basic realm="mail.contoso.com"
X-Powered-By →ASP.NET
request-id →5ca2c827-5147-474c-8457-63c4e5099c6e

如果自动发现或 ActiveSync 响应与上述示例不同,则可以调查以下可能的原因:

  1. 如果无法访问自动发现终结点,则可能 (防火墙或负载均衡器配置问题,例如,配置了 IP 限制,并且) 不存在所需的 IP 范围。 Also, there may be a device in front of Exchange requiring pre-authentication to access the AutoDiscover endpoint.

  2. 如果自动发现终结点未返回正确的 URL,则 ActiveSync 虚拟目录的 ExternalURL 值存在配置问题。

  3. 如果无法访问 ActiveSync 终结点,则存在防火墙或负载均衡器配置问题。 同样,一个示例是配置了 IP 限制,并且不存在所需的 IP 范围。 Also, there may be a device in front of Exchange requiring pre-authentication to access the ActiveSync endpoint.

  4. 如果 ActiveSync 终结点不包含authorization_uri值,请使用 Exchange 命令行管理程序验证 EvoSTS 身份验证服务器是否配置为默认终结点:

    Get-AuthServer EvoSts | Format-List IsDefaultAuthorizationEndpoint
    
  5. 如果 ActiveSync 终结点不包含 WWW-Authenticate 标头,则 Exchange 前面的设备可能正在响应查询。

Client synchronization issues

There are a few scenarios that can result in data being stale in Outlook for iOS and Android. 通常,此数据状况是由于第二个访问令牌 (Exchange Online中 MRS 用于将数据与本地环境同步的令牌) 的问题。 The two most common reasons for this issue are:

  • SSL/TLS offloading on-premises.
  • EvoSTS certificate metadata issues.

With SSL/TLS offloading, tokens are issued for a specific uri and that value includes the protocol value ("https://"). 当负载均衡器卸载 SSL/TLS 时,Exchange 接收的请求通过 HTTP 传入,导致声明不匹配,因为协议值 http://。 以下示例描述了 Fiddler 跟踪中的响应标头:

Content-Length →0
Date →Mon, 29 Jan 2018 19:51:46 GMT
Server →Microsoft-IIS/10.0 Microsoft-HTTPAPI/2.0
WWW-Authenticate →Bearer client_id="00000002-0000-0ff1-ce00-000000000000", trusted_issuers="00000001-0000-0000-c000-000000000000@00c118a9-2de9-41d3-b39a-81648a7a5e4d", authorization_uri="https://login.windows.net/common/oauth2/authorize", error="invalid_token"
WWW-Authenticate →Basic realm="mail.contoso.com"
X-Powered-By →ASP.NET
request-id →2323088f-8838-4f97-a88d-559bfcf92866
x-ms-diagnostics →2000003;reason="The hostname component of the audience claim value is invalid. Expected 'https://mail.contoso.com'. Actual 'http://mail.contoso.com'.";error_category="invalid_resource"

如上述 技术和许可要求部分所述,OAuth 流不支持 SSL/TLS 卸载。

对于 EvoSTS 证书元数据,EvoSTS 使用的证书元数据偶尔会在 Microsoft 365 或 Office 365 中更新。 The Exchange on-premises arbitration mailbox that has the organization capability of "OrganizationCapabilityManagement" is responsible for detecting the changes and for updating the corresponding metadata on-premises; this process executes every eight hours.

Exchange Administrators can find this mailbox by executing the following cmdlet using Exchange Management Shell:

$x=Get-mailbox -arbitration | ? {$_.PersistedCapabilities -like "OrganizationCapabilityManagement"};Get-MailboxDatabaseCopyStatus $x.database.name

On the server hosting the database for the OrganizationCapabilityManagement arbitration mailbox, review the application event logs for events with a source of MSExchange AuthAdmin. 事件应告知 Exchange 是否可以刷新元数据。 If the metadata is out of date, you can manually refresh it with this ccmdlet:

Set-AuthServer EvoSts -RefreshAuthMetadata

You can also create a scheduled task that executes the above command every 24 hours.

Exchange Online统计信息

可以使用以下Exchange Online cmdlet 查看每个同步的本地邮箱的统计信息。

  1. 首先,获取租户中同步的本地邮箱的位置,指定本地邮箱的标识 (例如 jane@contoso.com) 。

    $m = Get-MailboxLocation <identity>
    
  2. 若要查看与邮箱相关的统计信息,请使用

    Get-MailboxStatistics $m.id
    
  3. 若要查看移动设备统计信息 ((例如查看 Outlook for iOS 和 Android 上次同步到Exchange Online) 时),请使用

    Get-MobileDeviceStatistics -Mailbox $m.id
    

有关详细信息,请参阅 Get-MailboxStatisticsGet-MobileDeviceStatistics

Other issues

There are other issues that may prevent hybrid Modern Authentication from functioning correctly. For more information, see the troubleshooting section in Announcing Hybrid Modern Authentication for Exchange On-Premises.