-
Notifications
You must be signed in to change notification settings - Fork 301
Description
Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Version
- botbuilder-integration-aiohttp>=4.17.0
- botbuilder-dialogs>=4.16.2
Describe the bug
While trying to provision the bot-team-authentication sample, we encountered the following error:
Sample Link - https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-teams-authentication/python

After updating from MultiTenant to SingleTenant and installing the app, while keeping BotFrameworkAdapter, we started receiving the following error:
icrosoft-SkypeBotApi (Microsoft-BotFramework/3.0)"
INFO:root:Incoming activity type: conversationUpdate
INFO:root:Activity name: None
ERROR:root:Error in on_turn: Operation returned an invalid status code 'Unauthorized'
Traceback (most recent call last):
File "C:\HariData\August\samples\bot-teams-authentication\python\bots\dialog_bot.py", line 36, in on_turn
After changing the configuration from MultiTenant to SingleTenant, we observed the above errors.
We attempted to resolve the issue by performing the following steps:
- Updated the m365agents.local.yml file from MultiTenant to SingleTenant.
- Updated BotFrameworkAdapter to CloudAdapter.
After updating to CloudAdapter, we encountered the following error.
Note - These steps work correctly in the non-auth Python sample but fail in the auth sample.
[on_turn_error] unhandled error: 'ErrorResponse' object has no attribute 'token' Traceback (most recent call last): File "c:\Users\username\Downloads\bot-teams-authentication-python\.venv\Lib\site-packages\botbuilder\core\bot_adapter.py", line 174, in run_pipeline return await self._middleware.receive_activity_with_status( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\username\Downloads\bot-teams-authentication-python\.venv\Lib\site-packages\botbuilder\core\middleware_set.py", line 69, in receive_activity_with_status return await self.receive_activity_internal(context, callback) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\username\Downloads\bot-teams-authentication-python\.venv\Lib\site-packages\botbuilder\core\middleware_set.py", line 91, in receive_activity_internal raise error