Allow anonymous access to my Azure OpenAI chat bot

题意:允许匿名访问我的 Azure OpenAI 聊天机器人

问题背景:

I have an Azure OpenAI chat bot using my own data (I configured an OpenAI resource and chose Deploy as Web App) . Members of my domain can access it by logging in. Now I want it to be accessible anonymously or for other domains I define - whatever is easier to configure.

我有一个使用我自己数据的 Azure OpenAI 聊天机器人(我配置了一个 OpenAI 资源并选择了以 Web 应用的形式部署)。我的域内成员可以通过登录访问它。现在我希望它可以匿名访问,或者对我定义的其他域开放------以更容易配置的方式为准。

In the Azure Web App Authentication settings I could do two things:

在 Azure Web 应用的身份验证设置中,我可以做两件事:

  • Disable Authentication 禁用身份验证
  • Allow unauthenticated access 允许未认证的访问

See this screenshot: 看下面的截图

When I disable authentication or when I allow unauthenticated access I get in both cases the same error message when opening the chat bot:

当我禁用身份验证或允许未认证的访问时,在打开聊天机器人时,两种情况下都会出现相同的错误消息:

Authentication Not Configured

I also tried to allow not only my single domain but multiple account types of the Identity Provider. But when I login with a different domain I still the an error messge:

我还尝试允许不仅是我的单一域名,还包括多个身份提供者的帐户类型。但是,当我使用不同的域名登录时,我仍然看到错误消息:

AADSTS50020: User account 'myuser@otherdomain' from identity provider 'https://sts.windows.net/....../' does not exist in tenant 'MyDomain' and cannot access the application 'MyChatBot') in that tenant.

How to do it properly? 该如何正确配置?

问题解决:

Context

You have to understand that the "Deploy to Web App" button in Azure OpenAI Studio is only an accelerator for the "all-in-one" deployment of a project which is in fact open-sourced by Microsoft.

你需要了解,Azure OpenAI Studio 中的"部署到 Web 应用"按钮只是一个用于项目"一体化"部署的加速器,而该项目实际上是由微软开源的。

It's this one: 就是这个: GitHub - microsoft/sample-app-aoai-chatGPT: Sample code for a simple web chat experience through Azure OpenAI, including Azure OpenAI On Your Data.

So the Authentication Not Configured message you are facing is implemented inside this project, here:

所以你遇到的 "Authentication Not Configured" 错误消息是实现于该项目内部的,位置在这里:sample-app-aoai-chatGPT/frontend/src/pages/chat/Chat.tsx at af9d06b4ba153523fed366d3f8b1b19d1fc5f5e8 · microsoft/sample-app-aoai-chatGPT · GitHub

Possible solution 可能的解决方案

The README of the project explains that you can remove it if you want, here

该项目的 README 中解释了如果你想移除它,可以查看这里。

复制代码
To remove this restriction, you can add AUTH_ENABLED=False to the environment variables. This will disable authentication and allow anyone to access the chat functionality of your app. This is not recommended for production apps.

As said, "This is not recommended for production apps.".

正如所说,"这不建议用于生产环境的应用程序。"

Especially as the frontend is calling itself for the conversation (POST to /conversation) so if you remove the authentication, I guess that someone could use this endpoint directly to consume your OpenAI resource which is behind (ok, they can't modify your system message etc. but it's still an issue)

特别是因为前端是通过自身调用进行对话的(POST 到 /conversation),所以如果你移除了身份验证,我猜测有人可能会直接使用这个端点来消耗你后台的 OpenAI 资源(虽然他们不能修改你的系统消息等,但这仍然是一个问题)。

相关推荐
楠楠子呀15 分钟前
号码验证技术解析:从原理到实践
运维·人工智能·ai·electron·自动化
架构精进之路19 分钟前
Claude Code 深度使用指南:从"会用"到"用好"的7个进阶心法
后端·openai·ai编程
yuhulkjv3351 小时前
告别复制粘贴式降级:纳米AI鸿蒙版导出word格式为何绕不开“AI 导出鸭”
人工智能·ai·word·harmonyos·ai导出鸭
TechEdu2026061 小时前
[人工智能]Kimi(月之暗面 Moonshot AI):长上下文、智能体与工程实践
人工智能·ai
9i编程1 小时前
借助 Trae Work 学透 Multi-Agent 代码:从「抄出来了但没懂」到完整调通 v1.0.8
人工智能·openai·ai编程
边吃番茄边敲代码2 小时前
企业智能助手Agent 安全测试,包含Prompt Injection 和越权工具调用
人工智能·python·功能测试·ai·单元测试·prompt·模块测试
钉钉开发者社区2 小时前
来钉钉,接入 DeepSeek Harness
人工智能·ai·钉钉·钉钉cli
前沿在线3 小时前
Vbot ATOM发布,人形机器人进入产品化时刻
人工智能·ai·大模型
QCodingDev3 小时前
Spring AI Alibaba Graph实战:从ReAct Agent到Workflow,企业AI复杂流程该如何编排?
java·人工智能·spring·ai·ai编程·企业ai
是Dream呀4 小时前
5人设计组远程连工作站靠抢?用ToDesk团队设计版搭_数位板映射+多屏+权限_协同工作流
人工智能·ai·远程工作·todesk