使用Azure App Service身份验证时更改WWW-Authenticate标头

时间:2017-10-31 21:13:11

标签: asp.net web-services azure authentication azure-web-sites

这个问题与:

有关

尝试使用App Service Authentication和AAD提供程序使PowerBI连接到Azure App Service中托管的Web API。

WWW-Authenticate标头不识别身份提供者,因此PowerBI does not authenticate to the web API

使用应用服务身份验证时,是否可以修改WWW-Authenticate标头,可能使用IAuthenticationFilter

1 个答案:

答案 0 :(得分:1)

  

使用App Service身份验证时,是否可以使用IAuthenticationFilter修改WWW-Authenticate标头?

根据我的经验,如果我们使用WebApp集成的AAD身份验证,我们就无法使用IAuthenticationFilter。

如果我们set up the app to use the OWIN authentication pipeline,我们可以在来自ChallengeAsync的响应中执行此操作,您可以参考此blog以获取更多详细信息。