在www-oderorize azure函数easyauth中缺少授权_uri

发布于 2025-02-10 07:10:26 字数 826 浏览 2 评论 0原文

我已经配置了Azure功能,即开箱即用Azure AD身份提供商。当提出未经验证的请求时,它将返回www-partenticate标题显示该领域,但缺少授权_uri。这使得不可能使用Power BI中的组织凭据使用该函数,这需要授权_uri存在。

我相信这是与“新”内置的easesauth有关的问题,因为“经典” EasyAuth返回了更多信息,包括Resource_id。我有一个较旧的功能可以证明:

​-microsoft-identity-web in-azure-in-in-dunctions-v4-and-net-6-7e6ef97b2926“ rel =“ nofollow noreferrer”>在我的azure函数代码中使用microsoft.Identity.web hacky并为其他简单的代码增加了很多复杂性。 EasyAuth将所有内容都非常简单,如果在www-phatenticate标题中包含更多信息,它将完美地工作。

我如何获得具有EasyAuth的新Azure函数,使Aperauth能够在401响应中返回www-authenticate标题中的授权_uri?

I have configured my Azure Function with the out of the box Azure AD identity provider. When an unauthenticated request is made, it is returning the WWW-Authenticate header showing the realm, but missing the authorization_uri. This makes it impossible to use the function using Organization Credentials in Power BI, which requires authorization_uri to be present.

"New" EasyAuth/built-in auth 401 response

I believe this is an issue related to the "new" built-in EasyAuth, since the "classic" EasyAuth returned much more information, including resource_id. I have an older function to demonstrate:

"Classic" EasyAuth/built-in auth 401 response

The only workaround I have tried is to use Microsoft.Identity.Web in my Azure function code, but this is very hacky and adds a lot of complexity to otherwise simple code. EasyAuth keeps everything very simple and would work perfectly if it included more info in the WWW-Authenticate header.

How can I get a new Azure Function with EasyAuth enabled to return the authorization_uri in the WWW-Authenticate header in a 401 response?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

城歌 2025-02-17 07:10:26

检查您的身份验证设置 - >未经验证的请求,如果不是“ HTTP 302”,则Azure将不会返回授权_uri和其他数据。

Check your Authentication settings -> Unauthenticated requests, if it's not "HTTP 302", then Azure will not return authorization_uri and other data.

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文