Getting 401 - RestError While getting response from Azure OpenAI through node in Azure Bot App (Test in web chat using direct line/Web Chat Channel)

Agrawal, Shubham 0 Reputation points
2025-10-26T05:30:11.8466667+00:00

I am getting 401 - RestError While getting response back from Node (Deployed in Web App Service) that intern connect Azure OpenAI (Deployment: gtp-4). Please refer the below high level service design:

Bot App (Direct line/Web Chat Channel) --> Node (Web App) --> Azure OpenAi (Gpt-4)

I am using Test in Web Chat to test getting response or not. I verified the log in Log Stream, getting proper response back from OpenAI but while sending it to Web Chat getting 401 - RestError.

I have even disabled the the authentication from Web App Service but no luck. Can someone please help here or could you please suggest the possbile way to fix.

Not sure if it is a code problem or anything I am missing in azure configurations. Any help would be appreciated. Thanks.

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.