azure聊天机器人无法进行身份验证

m4pnthwp  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(187)

我正在尝试用python的bot框架创建一个聊天机器人。几天前我就已经开始工作了,但现在我在azure web chat中测试时遇到了一个错误: KeyError: 'access_token' . 使用这里的示例代码可以重现这个问题。
如果我删除config.py中的app id和密码,并在localhost上使用bot仿真器进行测试,那么它可以正常工作。当我将这些变量更改为正确的值并通过 ngrok 它以同样的例外失败。
我试着用curl检查凭证,它返回了这个错误。

{
    "error": "unauthorized_client",
    "error_description": "AADSTS700016: Application with identifier 'd720efc0-d9a3-4c7a-86ab-deed1a27739c' was not found in the directory 'botframework.com'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.\r\nTrace ID: de49aeb5-f200-4427-89f9-973fe2d10701\r\nCorrelation ID: 400d7c55-5854-44a6-a1f1-5a1eb74889da\r\nTimestamp: 2021-04-28 00:00:44Z",
    "error_codes": [
        700016
    ],
    "timestamp": "2021-04-28 00:00:44Z",
    "trace_id": "de49aeb5-f200-4427-89f9-973fe2d10701",
    "correlation_id": "400d7c55-5854-44a6-a1f1-5a1eb74889da",
    "error_uri": "https://login.microsoftonline.com/error?code=700016"
}

这听起来像是应用程序id是错误的,但是我通过从azure门户、bot频道注册、配置页面复制microsoft应用程序id来验证它。我想可能是我的密码错了,但如果是这样的话,我不知道该怎么改。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题