Skip to content

[BUG][Bot Service] deploymentEnvironment's default value causes internal server error when try to create ms teams channel #28636

Open
@ChenxiJiang333

Description

@ChenxiJiang333

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/botservice.json#L2259

API Spec version

2022-09-15

Describe the bug

As defined in swagger, MsTeamsChannel has property deploymentEnvironment with default value FallbackDeploymentEnvironment.
image
Yet, when passing this value to create MsTeamsChannel, would receive the error from service and fail to create the channel:

azure.core.exceptions.HttpResponseError: (UnknownError) An unexpected error occurred. Exception: 'Newtonsoft.Json.JsonSerializationException: Error converting value "FallbackDeploymentEnvironment" to type 'Microsoft.Bot.Internal.Schema.FirstPartyChannelDeploymentEnvironment'. Path 'properties.deploymentEnvironment'. ---> System.ArgumentException: Requested value 'FallbackDeploymentEnvironment' was not found.

Expected behavior

Update the swagger file to have a workable default value for property deploymentEnvironment.

Actual behavior

Now we have to remove deploymentEnvironment from the request body to make the operation succeed.

Reproduction Steps

Send request body with default values that defined in swagger, receive internal server error.

{"location": "global", "properties": {"channelName": "MsTeamsChannel", "location": "global", "properties": {"enableCalling": false, "isEnabled": true, "deploymentEnvironment": "FallbackDeploymentEnvironment"}}}

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bot ServiceMgmtThis issue is related to a management-plane library.Service AttentionWorkflow: This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions