Invalid AppId passed on token:

887 Views Asked by At

I tried to test bot framework integration with Microsoft Azure bot service using the java SDK provided by Microsoft, I keep getting below error message Caused by: com.microsoft.bot.connector.authentication.AuthenticationException: Invalid AppId passed on token: and when I test the App ID and Password using Microsoft Axure API login its work works fine. Please any help.

1

There are 1 best solutions below

1
On

The above-listed error is caused due to invalid App ID, Password or Invalid URI

Follow these steps to solve the above Error:

  1. In the Azure portal Go to Bot Registration > Access Control > Assign the user of the bot
  2. Then, connect to a bot running locally, and select Open bot. Add the port number and paste the updated URL in the Bot URL bar. Don’t Provide App ID and Password in the Emulator.

Note: Microsoft Bot emulator doc says that when you are running localhost with the correct port add the localhost with the correct port and ask you to keep an empty app id and password

If already have an app id & password in web.config. you must include it in the emulator also otherwise you will get the same authentication error.

Reference:

https://learn.microsoft.com/en-us/azure/bot-service/bot-service-debug-emulator?view=azure-bot-service-4.0&tabs=java#run-a-bot-locally

https://learn.microsoft.com/en-us/azure/bot-service/bot-service-debug-channel-ngrok?view=azure-bot-service-4.0

https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication?view=azure-bot-service-4.0#connector-to-bot