Skip to content

BotFrameworkAdapter.create_conversation overrides parameters.channel_data #1665

@yosshy

Description

@yosshy

Version

4.13

Describe the bug

A Teams bot using BotFrameworkAdapter can't create conversation in a team channel. turn_context.adapter.create_conversation() raises a parameter error of HTTP request.

To Reproduce

Steps to reproduce the behavior:

  1. Deploy a bot using BotFrameworkAdapter and turn_context.adapter.create_conversation() method to create a conversation in a team channel. To do it, conversation_parameters argument of create_conversation() must have channel_data attribute that has information of the channel to use.
  2. Show the logs of the bot. If you use Azure, Log-in to the Azure portal with a web browser, click "app service", click the bot app and click Log Stream.
  3. Log-in Teams.
  4. Make the bot creating a conversation in a team channel.
  5. See an error.
  6. Confirm the error logs in the log window you opened at step 2.

Expected behavior

A conversation will be created without any error.

Screenshots

No.

Additional context

No.

Additional Information

parameters.channel_data looks overridden in create_conversation() below:
https://github.com/microsoft/botbuilder-python/blob/main/libraries/botbuilder-core/botbuilder/core/bot_framework_adapter.py#L369

IMO, it should be:

if parameters.channel_data is None:
    parameters.channel_data = {}
parameters.channel_data["tenant"] = {"tenantId": reference.conversation.tenant_id}

Metadata

Metadata

Assignees

Labels

Area: SDKGeneral SDK issues that don't clearly map to other areas (e.g.: helper methods)Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.P0Must Fix. Release-blockerbugIndicates an unexpected problem or an unintended behavior.customer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions