Bot 401 error

Milos Vukovich 0 Reputation points
2024-02-15T00:13:29.05+00:00

Hi everyone, I created a bot in Python, and when tested locally it works Then I proceeded to host it on the Azure Web app and created a bot service, my endpoint link is correct, and I used env variables and my app ID and secret are correct too I checked that multiple times Why am I getting this 401 error when I open the bot in Teams, did someone have a similar issue? Thanks, Milos

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
779 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,014 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vikram Boorla (Tata Consultancy Services Limi) 250 Reputation points Microsoft Vendor
    2024-02-15T11:49:38.06+00:00

    Hello @Milos Vukovich This could happen if the bot's credentials are incorrect or if the user does not have the necessary permissions to access the bot. You may want to check the bot's configuration to ensure that the correct credentials are being used and also you can check permissions by navigating to Bot registration>Access control> then add youself as the owner of the bot.


  2. YutongTie-MSFT 48,001 Reputation points
    2024-02-22T05:16:09.82+00:00

    Hello @Milos Vukovich Thanks for reaching out to us, have you solved your problem? If not, besides the basic configuration, there are other items you can check -

    1. Check your Bot is Properly Registered: Make sure your bot is properly registered on the Azure portal. You should be able to test it in the 'Test in Web Chat' feature in the Bot Service resource in Azure.
    2. Manifest File: If you're using Teams, make sure your manifest file is correctly configured and updated. The bot's ID in the manifest should match the App ID in Azure.
    3. Use Appropriate Scopes: Make sure your bot has the appropriate scopes to communicate with Teams. For instance, if you want your bot to send one-on-one messages, it needs the 'https://graph.microsoft.com/User.Read' scope.
    4. Firewall and Networking Settings: If your bot is hosted behind a firewall, make sure the necessary firewall rules are in place to allow the Bot Framework service to communicate with your bot.

    If you are still blocked by this issue and you have checked on above, I would highly recommend you raising a support ticket. Please let us know if you have no support plan, I am happy to enable you a free support ticket for this case.

    Regards,

    Yutong

    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    0 comments No comments