Closed sohamM97 closed 4 months ago
Thanks for the feedback, we’ll investigate asap.
Hi @sohamM97 I failed to reproduce the issue with the code you provided, could you follow https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/debug_guide.mdton to provide detailed log for deep investigation?
By the way, this exception does not look like what raised by python, rather by csharp...
Hi @ChenxiJiang333 Seems I made a mistake while reporting the issue. I am actually getting the error while trying to create the channel for MS Teams, using the following code:
botservice.channels.create(
resource_group_name=resource_group,
resource_name=resource_name,
channel_name=ChannelName.MS_TEAMS_CHANNEL,
parameters=BotChannel(
location="global",
properties=MsTeamsChannel(
properties=MsTeamsChannelProperties(is_enabled=True)
),
),
)
I will get back to you with logs soon. Also just for reference, there's a mistake in the URL. I presume the actual link you meant to attach was https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/debug_guide.md?
Hi @ChenxiJiang333 Here are the logs:
2024-04-08 13:40:23,362 - msal.authority - INFO - Initializing with Entra authority: https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0
2024-04-08 13:40:23,362 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/v2.0/.well-known/openid-configuration'
Request method: 'GET'
Request headers:
'User-Agent': 'azsdk-python-identity/1.15.0 Python/3.11.7 (Linux-5.15.0-101-generic-x86_64-with-glibc2.31)'
No body was attached to the request
2024-04-08 13:40:23,364 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): login.microsoftonline.com:443
2024-04-08 13:40:32,359 - urllib3.connectionpool - DEBUG - https://login.microsoftonline.com:443 "GET /6b62a1c7-55b4-42ce-8c14-162851182af0/v2.0/.well-known/openid-configuration HTTP/1.1" 200 1753
2024-04-08 13:40:32,361 - azure.core.pipeline.policies.http_logging_policy - INFO - Response status: 200
Response headers:
'Cache-Control': 'max-age=86400, private'
'Content-Type': 'application/json; charset=utf-8'
'Strict-Transport-Security': 'REDACTED'
'X-Content-Type-Options': 'REDACTED'
'Access-Control-Allow-Origin': 'REDACTED'
'Access-Control-Allow-Methods': 'REDACTED'
'P3P': 'REDACTED'
'x-ms-request-id': 'd5a25444-1d2d-4e79-9ca0-06c56a3c5200'
'x-ms-ests-server': 'REDACTED'
'x-ms-srs': 'REDACTED'
'X-XSS-Protection': 'REDACTED'
'Set-Cookie': 'REDACTED'
'Date': 'Mon, 08 Apr 2024 08:10:31 GMT'
'Content-Length': '1753'
2024-04-08 13:40:32,361 - msal.authority - DEBUG - openid_config("https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/kerberos', 'tenant_region_scope': 'AS', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
2024-04-08 13:40:32,362 - msal.application - DEBUG - Broker enabled? None
2024-04-08 13:40:32,362 - msal.telemetry - DEBUG - Generate or reuse correlation_id: daaa8d63-b412-462d-b668-c6272af6a708
2024-04-08 13:40:32,363 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/oauth2/v2.0/token'
Request method: 'POST'
Request headers:
'Accept': 'application/json'
'x-client-sku': 'REDACTED'
'x-client-ver': 'REDACTED'
'x-client-os': 'REDACTED'
'x-ms-lib-capability': 'REDACTED'
'client-request-id': 'REDACTED'
'x-client-current-telemetry': 'REDACTED'
'x-client-last-telemetry': 'REDACTED'
'User-Agent': 'azsdk-python-identity/1.15.0 Python/3.11.7 (Linux-5.15.0-101-generic-x86_64-with-glibc2.31)'
A body is sent with the request
2024-04-08 13:40:32,552 - urllib3.connectionpool - DEBUG - https://login.microsoftonline.com:443 "POST /6b62a1c7-55b4-42ce-8c14-162851182af0/oauth2/v2.0/token HTTP/1.1" 200 1368
2024-04-08 13:40:32,553 - azure.core.pipeline.policies.http_logging_policy - INFO - Response status: 200
Response headers:
'Cache-Control': 'no-store, no-cache'
'Pragma': 'no-cache'
'Content-Type': 'application/json; charset=utf-8'
'Expires': '-1'
'Strict-Transport-Security': 'REDACTED'
'X-Content-Type-Options': 'REDACTED'
'P3P': 'REDACTED'
'client-request-id': 'REDACTED'
'x-ms-request-id': 'e4fd6672-80ba-4016-82fb-ae9376006c00'
'x-ms-ests-server': 'REDACTED'
'x-ms-clitelem': 'REDACTED'
'x-ms-srs': 'REDACTED'
'X-XSS-Protection': 'REDACTED'
'Set-Cookie': 'REDACTED'
'Date': 'Mon, 08 Apr 2024 08:10:31 GMT'
'Content-Length': '1368'
2024-04-08 13:40:32,553 - msal.token_cache - DEBUG - event={
"client_id": "d9a86074-663f-46a3-91a1-4d400bd9db8c",
"data": {
"claims": null,
"scope": [
"https://management.azure.com/.default"
]
},
"environment": "login.microsoftonline.com",
"grant_type": "client_credentials",
"params": null,
"response": {
"access_token": "********",
"expires_in": 3599,
"ext_expires_in": 3599,
"token_type": "Bearer"
},
"scope": [
"https://management.azure.com/.default"
],
"token_endpoint": "https://login.microsoftonline.com/6b62a1c7-55b4-42ce-8c14-162851182af0/oauth2/v2.0/token"
}
2024-04-08 13:40:32,553 - azure.identity._internal.get_token_mixin - INFO - ClientSecretCredential.get_token succeeded
2024-04-08 13:40:32,554 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'https://management.azure.com/subscriptions/2ff923da-5f77-4c1e-88b0-42af9808ec1e/resourceGroups/RG_AIStudio_Dev/providers/Microsoft.BotService/botServices/sohamtestbot?api-version=REDACTED'
Request method: 'PUT'
Request headers:
'Content-Type': 'application/json'
'Content-Length': '465'
'Accept': 'application/json'
'x-ms-client-request-id': '72f8d72a-f57f-11ee-a461-a0e70b5eb59b'
'User-Agent': 'azsdk-python-mgmt-botservice/2.0.0 Python/3.11.7 (Linux-5.15.0-101-generic-x86_64-with-glibc2.31)'
'Authorization': 'REDACTED'
A body is sent with the request
2024-04-08 13:40:32,556 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): management.azure.com:443
2024-04-08 13:40:54,466 - urllib3.connectionpool - DEBUG - https://management.azure.com:443 "PUT /subscriptions/2ff923da-5f77-4c1e-88b0-42af9808ec1e/resourceGroups/RG_AIStudio_Dev/providers/Microsoft.BotService/botServices/sohamtestbot?api-version=2022-09-15 HTTP/1.1" 201 1451
2024-04-08 13:40:54,467 - azure.core.pipeline.policies.http_logging_policy - INFO - Response status: 201
Response headers:
'Cache-Control': 'no-cache'
'Pragma': 'no-cache'
'Content-Length': '1451'
'Content-Type': 'application/json; charset=utf-8'
'Expires': '-1'
'ETag': '"9900c651-0000-1800-0000-6613a68c0000"'
'Strict-Transport-Security': 'REDACTED'
'x-ms-request-id': '3661610a-20ba-44a3-a056-6ed1dd468d5a'
'x-ms-ratelimit-remaining-subscription-writes': '1199'
'x-ms-correlation-request-id': 'REDACTED'
'x-ms-routing-request-id': 'REDACTED'
'X-Content-Type-Options': 'REDACTED'
'X-Cache': 'REDACTED'
'X-MSEdge-Ref': 'REDACTED'
'Date': 'Mon, 08 Apr 2024 08:10:54 GMT'
2024-04-08 13:40:54,468 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'https://management.azure.com/subscriptions/2ff923da-5f77-4c1e-88b0-42af9808ec1e/resourceGroups/RG_AIStudio_Dev/providers/Microsoft.BotService/botServices/sohamtestbot/channels/MsTeamsChannel?api-version=REDACTED'
Request method: 'PUT'
Request headers:
'Content-Type': 'application/json'
'Content-Length': '210'
'Accept': 'application/json'
'x-ms-client-request-id': '85832c6a-f57f-11ee-a461-a0e70b5eb59b'
'User-Agent': 'azsdk-python-mgmt-botservice/2.0.0 Python/3.11.7 (Linux-5.15.0-101-generic-x86_64-with-glibc2.31)'
'Authorization': 'REDACTED'
A body is sent with the request
2024-04-08 13:40:55,592 - urllib3.connectionpool - DEBUG - https://management.azure.com:443 "PUT /subscriptions/2ff923da-5f77-4c1e-88b0-42af9808ec1e/resourceGroups/RG_AIStudio_Dev/providers/Microsoft.BotService/botServices/sohamtestbot/channels/MsTeamsChannel?api-version=2022-09-15 HTTP/1.1" 500 4173
2024-04-08 13:40:55,593 - azure.core.pipeline.policies.http_logging_policy - INFO - Response status: 500
Response headers:
'Cache-Control': 'no-cache'
'Pragma': 'no-cache'
'Content-Length': '4173'
'Content-Type': 'application/json; charset=utf-8'
'Expires': '-1'
'Strict-Transport-Security': 'REDACTED'
'x-ms-request-id': 'efd40ea8-e8b5-4050-a377-c344f68ff914'
'x-ms-failure-cause': 'REDACTED'
'x-ms-ratelimit-remaining-subscription-writes': '1199'
'x-ms-correlation-request-id': 'REDACTED'
'x-ms-routing-request-id': 'REDACTED'
'X-Content-Type-Options': 'REDACTED'
'X-Cache': 'REDACTED'
'X-MSEdge-Ref': 'REDACTED'
'Date': 'Mon, 08 Apr 2024 08:10:55 GMT'
2024-04-08 13:40:55,594 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'https://management.azure.com/subscriptions/2ff923da-5f77-4c1e-88b0-42af9808ec1e/resourceGroups/RG_AIStudio_Dev/providers/Microsoft.BotService/botServices/sohamtestbot/channels/MsTeamsChannel?api-version=REDACTED'
Request method: 'PUT'
Request headers:
'Content-Type': 'application/json'
'Content-Length': '210'
'Accept': 'application/json'
'x-ms-client-request-id': '85832c6a-f57f-11ee-a461-a0e70b5eb59b'
'User-Agent': 'azsdk-python-mgmt-botservice/2.0.0 Python/3.11.7 (Linux-5.15.0-101-generic-x86_64-with-glibc2.31)'
'Authorization': 'REDACTED'
A body is sent with the request
2024-04-08 13:40:56,758 - urllib3.connectionpool - DEBUG - https://management.azure.com:443 "PUT /subscriptions/2ff923da-5f77-4c1e-88b0-42af9808ec1e/resourceGroups/RG_AIStudio_Dev/providers/Microsoft.BotService/botServices/sohamtestbot/channels/MsTeamsChannel?api-version=2022-09-15 HTTP/1.1" 500 4173
2024-04-08 13:40:56,759 - azure.core.pipeline.policies.http_logging_policy - INFO - Response status: 500
Response headers:
'Cache-Control': 'no-cache'
'Pragma': 'no-cache'
'Content-Length': '4173'
'Content-Type': 'application/json; charset=utf-8'
'Expires': '-1'
'Strict-Transport-Security': 'REDACTED'
'x-ms-request-id': 'd226d578-bb21-441d-957e-2fdda356290b'
'x-ms-failure-cause': 'REDACTED'
'x-ms-ratelimit-remaining-subscription-writes': '1199'
'x-ms-correlation-request-id': 'REDACTED'
'x-ms-routing-request-id': 'REDACTED'
'X-Content-Type-Options': 'REDACTED'
'X-Cache': 'REDACTED'
'X-MSEdge-Ref': 'REDACTED'
'Date': 'Mon, 08 Apr 2024 08:10:56 GMT'
2024-04-08 13:40:58,359 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'https://management.azure.com/subscriptions/2ff923da-5f77-4c1e-88b0-42af9808ec1e/resourceGroups/RG_AIStudio_Dev/providers/Microsoft.BotService/botServices/sohamtestbot/channels/MsTeamsChannel?api-version=REDACTED'
Request method: 'PUT'
Request headers:
'Content-Type': 'application/json'
'Content-Length': '210'
'Accept': 'application/json'
'x-ms-client-request-id': '85832c6a-f57f-11ee-a461-a0e70b5eb59b'
'User-Agent': 'azsdk-python-mgmt-botservice/2.0.0 Python/3.11.7 (Linux-5.15.0-101-generic-x86_64-with-glibc2.31)'
'Authorization': 'REDACTED'
A body is sent with the request
2024-04-08 13:40:59,688 - urllib3.connectionpool - DEBUG - https://management.azure.com:443 "PUT /subscriptions/2ff923da-5f77-4c1e-88b0-42af9808ec1e/resourceGroups/RG_AIStudio_Dev/providers/Microsoft.BotService/botServices/sohamtestbot/channels/MsTeamsChannel?api-version=2022-09-15 HTTP/1.1" 500 4173
2024-04-08 13:40:59,689 - azure.core.pipeline.policies.http_logging_policy - INFO - Response status: 500
Response headers:
'Cache-Control': 'no-cache'
'Pragma': 'no-cache'
'Content-Length': '4173'
'Content-Type': 'application/json; charset=utf-8'
'Expires': '-1'
'Strict-Transport-Security': 'REDACTED'
'x-ms-request-id': 'ac6cde9f-0975-4f60-af75-0372e93fb497'
'x-ms-failure-cause': 'REDACTED'
'x-ms-ratelimit-remaining-subscription-writes': '1199'
'x-ms-correlation-request-id': 'REDACTED'
'x-ms-routing-request-id': 'REDACTED'
'X-Content-Type-Options': 'REDACTED'
'X-Cache': 'REDACTED'
'X-MSEdge-Ref': 'REDACTED'
'Date': 'Mon, 08 Apr 2024 08:10:59 GMT'
2024-04-08 13:41:02,890 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'https://management.azure.com/subscriptions/2ff923da-5f77-4c1e-88b0-42af9808ec1e/resourceGroups/RG_AIStudio_Dev/providers/Microsoft.BotService/botServices/sohamtestbot/channels/MsTeamsChannel?api-version=REDACTED'
Request method: 'PUT'
Request headers:
'Content-Type': 'application/json'
'Content-Length': '210'
'Accept': 'application/json'
'x-ms-client-request-id': '85832c6a-f57f-11ee-a461-a0e70b5eb59b'
'User-Agent': 'azsdk-python-mgmt-botservice/2.0.0 Python/3.11.7 (Linux-5.15.0-101-generic-x86_64-with-glibc2.31)'
'Authorization': 'REDACTED'
A body is sent with the request
2024-04-08 13:41:04,476 - urllib3.connectionpool - DEBUG - https://management.azure.com:443 "PUT /subscriptions/2ff923da-5f77-4c1e-88b0-42af9808ec1e/resourceGroups/RG_AIStudio_Dev/providers/Microsoft.BotService/botServices/sohamtestbot/channels/MsTeamsChannel?api-version=2022-09-15 HTTP/1.1" 500 4173
2024-04-08 13:41:04,477 - azure.core.pipeline.policies.http_logging_policy - INFO - Response status: 500
Response headers:
'Cache-Control': 'no-cache'
'Pragma': 'no-cache'
'Content-Length': '4173'
'Content-Type': 'application/json; charset=utf-8'
'Expires': '-1'
'Strict-Transport-Security': 'REDACTED'
'x-ms-request-id': '6897a277-bcc5-48e2-bb4f-0463f9c17a6e'
'x-ms-failure-cause': 'REDACTED'
'x-ms-ratelimit-remaining-subscription-writes': '1199'
'x-ms-correlation-request-id': 'REDACTED'
'x-ms-routing-request-id': 'REDACTED'
'X-Content-Type-Options': 'REDACTED'
'X-Cache': 'REDACTED'
'X-MSEdge-Ref': 'REDACTED'
'Date': 'Mon, 08 Apr 2024 08:11:04 GMT'
Traceback (most recent call last):
File "/home/soham/Projects/test_azure_bot.py", line 56, in <module>
botservice.channels.create(
File "/home/soham/anaconda3/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/soham/anaconda3/lib/python3.11/site-packages/azure/mgmt/botservice/operations/_channels_operations.py", line 483, in create
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
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.
at Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(Type enumType, NamingStrategy namingStrategy, String value, Boolean disallowNumber)
at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject[T]()
at Intercom.ResourceProvider.Channels.BaseTypedArmChannelManager`3.<UpdateChannelAsync>d__8.MoveNext() in C:\__w\1\s\Intercom.ResourceProvider\Channels\ArmChannelManager.cs:line 384
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Intercom.ResourceProvider.DataProviders.ChannelResourceDataProvider.<InsertResourceAsync>d__10.MoveNext() in C:\__w\1\s\Intercom.ResourceProvider\DataProviders\ChannelResourceDataProvider.cs:line 192'.
Code: UnknownError
Message: 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.
at Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(Type enumType, NamingStrategy namingStrategy, String value, Boolean disallowNumber)
at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject[T]()
at Intercom.ResourceProvider.Channels.BaseTypedArmChannelManager`3.<UpdateChannelAsync>d__8.MoveNext() in C:\__w\1\s\Intercom.ResourceProvider\Channels\ArmChannelManager.cs:line 384
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Intercom.ResourceProvider.DataProviders.ChannelResourceDataProvider.<InsertResourceAsync>d__10.MoveNext() in C:\__w\1\s\Intercom.ResourceProvider\DataProviders\ChannelResourceDataProvider.cs:line 192'.
I see, there might be something wrong with the default value of property deploymentEnvironment
that sent to the service. Since Python sdk is auto generated by swagger definition, I have to open an issue to turn to the service team to make an update. https://github.com/Azure/azure-rest-api-specs/issues/28636
For now, you can update your code to:
botservice.channels.create(
resource_group_name=resource_group,
resource_name=resource_name,
channel_name=ChannelName.MS_TEAMS_CHANNEL,
parameters=BotChannel(
location="global",
properties=MsTeamsChannel(
properties=MsTeamsChannelProperties(is_enabled=True, deployment_environment=None)
),
),
)
Thanks, setting deployment_environment=None
fixed the issue for now.
Then we would close this issue, please follow https://github.com/Azure/azure-rest-api-specs/issues/28636 for updates.
Describe the bug I have been trying to create an Azure Bot Service with msa_app_type="MultiTenant" using Azure Bot Service SDK. I get the following exception:
To Reproduce Steps to reproduce the behavior:
Expected behavior The Azure Bot should have been created.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.