Azure Web App bot无法正常工作 - 身份验证问题 [英] Azure Web App bot not working - Authentication issues

查看:449
本文介绍了Azure Web App bot无法正常工作 - 身份验证问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在Azure门户中创建了一个新的Web App Bot,使用由我的组织管理员提供的Microsoft App Id和密码,因为我的权限(我没有Active)注册新应用程序的目录权限。)

I have created a new Web App Bot in Azure Portal, using Microsoft App Id and Password which was provided by my organization admin, because of my permissions (I don't have Active Directory permissions to register a new application).


我成功创建了机器人,但它没有按预期工作。消息不是从机器人发送的。一旦我发送消息,我在机器人输出中出现此错误,

I created the bot successfully, but it is not working as expected. The messages are not sent from the bot. As soon as I send the message I got this error in bot output,

Error: Refresh access token failed with status code: 400 at Request._callback 
(D:\home\site\wwwroot\node_modules\botbuilder\lib\bots\ChatConnector.js:697:36) at Request.self.callback 
(D:\home\site\wwwroot\node_modules\request\request.js:185:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request. 
(D:\home\site\wwwroot\node_modules\request\request.js:1161:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage. 
(D:\home\site\wwwroot\node_modules\request\request.js:1083:12) at IncomingMessage.g (events.js:291:16) at emitNone (events.js:91:20)





然后我试图解决机器人认证,我也跟着此页面中提供的步骤  https://docs.microsoft.com/en-us/azure/bot-service/bot-service-troubleshoot-authentication-problems?view = azure-bot-service-3.0#step-2


Then I tried to troubleshoot the bot authentication, I followed the step provided in this page https://docs.microsoft.com/en-us/azure/bot-service/bot-service-troubleshoot-authentication-problems?view=azure-bot-service-3.0#step-2


此后,来自curl的POST请求将App Id作为客户端ID并将App密码作为客户端密码,我收到以下错误

Here after the POST request from curl with App Id as client Id and App password as client secret, I got the below error

{    
    "error": "unauthorized_client",    
    "error_description": "AADSTS700016: Application with identifier '[AppId]' 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: fb60c381-afa9-48f4-8946-155a3ab21a00\r\nCorrelation ID: 5f51355a-8e8d-471d-aeba-a286ba620362\r\nTimestamp: 2019-01-10 06:54:24Z",    
    "error_codes": [700016],    
    "timestamp": "2019-01-10 06:54:24Z",    
    "trace_id": "fb60c381-afa9-48f4-8946-155a3ab21a00",    
    "correlation_id": "5f51355a-8e8d-471d-aeba-a286ba620362"
}



从这一个,我知道Bot的AppId和密码存在问题。

From this one, I understood there is an issue with Bot's AppId and Password.


如何解决这个问题?

How can I fix this issue ??



推荐答案



(我没有Active Directory权限来注册新的应用程序)。

(I don't have Active Directory permissions to register a new application).



看起来选项"用户可以注册申请"可能已经设置为否为租户问题。

It looks like the option "Users can register application" may have been set to NO to the tenant in question.

现在,如果是这种情况,您必须联系租户的全球管理员并让他们授予您

Application Developer
权限。

Now, if that be the case, you would have to contact the Global Admin of the tenant and have them grant you Application Developer permissions.


这篇关于Azure Web App bot无法正常工作 - 身份验证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆