首页 > 解决方案 > Azure B2C 负载平衡应用服务受众验证失败

问题描述

我们正在使用 Azure B2C 租户来处理我们的 Azure 应用程序的登录,该应用程序有几个位于不同地理位置的实例(主要/次要)。以前,用户会根据他们的地理位置点击主要或次要,这样单个用户可能会在整个会话期间坚持使用他们点击的任何实例(除非一个用户死亡并故障转移)。

我们最近切换到将用户(在一些 Azure 停机时间之后)路由到这些应用服务中的每一个的负载平衡方式,并且我们现在收到了一些Audience Validation Failed 错误,因为 - 据我所知 - 用户最初是从主要说重定向到 B2C 登录,登录然后负载平衡回辅助(其他)应用程序服务,这样应用程序 Id(每个应用程序服务一个) - 在 B2C 中控制 -租户不正确,因此出现错误。

我们正在使用AddAzureAdB2C从 B2C howtos 中提取的内容,其中包含OpenIdConnect

有没有办法处理这个问题,以便在任何一个应用程序服务上都可以进行任何登录,可能有一个共享的受众,或者类似的?

标签: azureasp.net-coreopenid-connectazure-ad-b2c

解决方案


If it is the same app that is deployed behind a common domain (e.g. mywebapp.trafficmanager.net) to multiple services (e.g. mywebappeu.azurewebsites.net and mywebappus.azurewebsites.net), then you should create a single app in Azure AD B2C and set this app identifier with both the app services.


推荐阅读