Problem with Bot Framework

Brass Contributor

I have created a simple bot. And it's 100% working on the emulator. (I have tested it) But when I have created it on real-teams via and via manually uploading manifest created in App Studio. Then I set up server on But always I got this error:



PermissionError: [Errno Unauthorized. Invalid AppId passed on token: ] [*]



* - ID of App created in App Registrations

11 Replies

@norxnd - Do your bot has authentication? Could you please share more info what you are trying?

@Nikitha-MSFTWell I'm trying to make a Teams chatbot that will react to messages and do some actions and I just do not know what to do. I'm probably doing everything wrong because I don't understand any of this API / Framework at all. I do not have an Azure subscription.


Hare is my test code:


And I do not know If it has auth. I do not know anything

@norxnd - Could you please check the docs try if that helps here. Try if that helps

@Nikitha-MSFTI have checked the docs first. I said, bot works in emulator. But thanks for help. 

best response confirmed by norxnd (Brass Contributor)

Ok. I solved the problem for myself! That was very easy and it was a problem with my code. I needed to add AppID and Password from App Studio to my Adapter class.

Looks like a similar framework can be leveraged from cloud API. I had a similar issue with developing a sentiment analysis bot and had to reach out to several chatbot development services, thanks to them I got an understanding of integrating chatbot framework into existing AI. Turns out it was a simple code error. This is similar in your case, there are several sections where I noticed a few errors, but since your framework is entirely different I don't know the correct code for it. Hope you go through the code once again. cheers!!

It seems like you can benefit from a cloud API for your AI chatbot development. I encountered a similar situation with a sentiment analysis bot and sought help from AI chatbot development services. They pinpointed code errors, which turned out to be a simple fix. Take a closer look at your code – there might be small mistakes causing the issues. Cheers! And consider consulting with an AI chatbot development company for guidance.

Ensure your Microsoft Teams bot credentials (App ID, App Password) match your emulator setup. Validate the manifest and Microsoft Teams channel config, ensuring the correct endpoint. Recheck token generation in your bot code. Test locally before uploading. Update dependencies and consult Microsoft Teams documentation. If issues persist, reach out to Microsoft Support or consider assistance from a specialized company specializing in the development of AI chatbots for specialized guidance for tailored guidance.

It seems like the issue you're encountering is related to authentication and authorization with the Bot Framework. For this, you need proper chatbot development services from experts. Still, here are some steps you can take to troubleshoot and resolve the issue:

1. Check App ID and App Password

2. Verify Bot Registration

3. Check Authentication


4. Review Token Issuance

5. Inspect Token

6. Permissions and Scopes

7. Review Bot Framework Documentation 8. Test Locally

9. Check Logs

10. Reach Out for Support By following these steps and carefully reviewing your bot's authentication and authorization setup, you should be able to identify and resolve the Permission Error you're encountering.

Hii,! I'm sorry to hear you're experiencing issues with the Bot Framework. Can you provide more details about the problem you're encountering? I'd be happy to try and help troubleshoot or point you in the right direction for assistance. Hang in there! BTW, I provide technology solutions through blogs on my website. You can check it out.

Sorry to hear that you're encountering issues with your bot on the Bot Framework. It's frustrating when something that works perfectly in one environment doesn't translate smoothly to another. Have you checked if there are any specific configurations or permissions required for deploying bots on Teams that might be missing? Additionally, ensuring that the AppId passed on the token is valid could potentially resolve the Permission Error you're encountering. Integrating IOT product development into your bot could also offer unique functionalities for users. Keep troubleshooting and experimenting; you'll likely find the solution soon!

1 best response

Accepted Solutions
best response confirmed by norxnd (Brass Contributor)

Ok. I solved the problem for myself! That was very easy and it was a problem with my code. I needed to add AppID and Password from App Studio to my Adapter class.

View solution in original post