Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az iot dps enrollment-group update fails when initial-twin-tags is 'version' #30610

Open
orjanto opened this issue Jan 6, 2025 · 2 comments
Open
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. IoT/CLI IoT Service Attention This issue is responsible by Azure service team.

Comments

@orjanto
Copy link

orjanto commented Jan 6, 2025

Describe the bug

az iot dps enrollment-group update fails when initial-twin-tags is set to "{'version': '3.2.0'}". If I name the tag "{'my-version': '3.2.0'}", then it works fine.

Full command:

az iot dps enrollment-group update --dps-name dps-dev-xxxx\
--enrollment-id dev-amd64 \
--initial-twin-tags "{'version': '3.2.0'}" --debug

I'm able to edit the device twin tag in the azure portal in Azure IoT Hub Device Provisioning Service (DPS) > Settings > Manage enrollments > Select group > Device settings.

Related command

az iot dps enrollment-group update

Errors

cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: ("Unable to deserialize response data. Data: 3.2.0, long, ValueError: invalid literal for int() with base 10: '3.2.0'", ValueError("invalid literal for int() with base 10: '3.2.0'"))
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1621, in deserialize_data
    data_val = self.deserialize_type[data_type](data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1867, in deserialize_long
    return _long_type(attr)
           ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '3.2.0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/*****/.azure/cliextensions/azure-iot/azext_iot/operations/dps.py", line 656, in iot_dps_device_enrollment_group_update
    return sdk.enrollment_group.create_or_update(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/*****/.azure/cliextensions/azure-iot/azext_iot/sdk/dps/service/operations/enrollment_group_operations.py", line 160, in create_or_update
    deserialized = self._deserialize('EnrollmentGroup', response)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1376, in __call__
    return self._deserialize(target_obj, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1637, in deserialize_data
    raise_with_traceback(DeserializationError, msg, err)
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1621, in deserialize_data
    data_val = self.deserialize_type[data_type](data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1867, in deserialize_long
    return _long_type(attr)
           ^^^^^^^^^^^^^^^^
azure.core.exceptions.DeserializationError: ("Unable to deserialize response data. Data: 3.2.0, long, ValueError: invalid literal for int() with base 10: '3.2.0'", ValueError("invalid literal for int() with base 10: '3.2.0'"))
az_command_data_logger: ("Unable to deserialize response data. Data: 3.2.0, long, ValueError: invalid literal for int() with base 10: '3.2.0'", ValueError("invalid literal for int() with base 10: '3.2.0'"))
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1621, in deserialize_data
    data_val = self.deserialize_type[data_type](data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1867, in deserialize_long
    return _long_type(attr)
           ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '3.2.0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/*****/.azure/cliextensions/azure-iot/azext_iot/operations/dps.py", line 656, in iot_dps_device_enrollment_group_update
    return sdk.enrollment_group.create_or_update(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/*****/.azure/cliextensions/azure-iot/azext_iot/sdk/dps/service/operations/enrollment_group_operations.py", line 160, in create_or_update
    deserialized = self._deserialize('EnrollmentGroup', response)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1376, in __call__
    return self._deserialize(target_obj, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1637, in deserialize_data
    raise_with_traceback(DeserializationError, msg, err)
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1621, in deserialize_data
    data_val = self.deserialize_type[data_type](data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1867, in deserialize_long
    return _long_type(attr)
           ^^^^^^^^^^^^^^^^
azure.core.exceptions.DeserializationError: ("Unable to deserialize response data. Data: 3.2.0, long, ValueError: invalid literal for int() with base 10: '3.2.0'", ValueError("invalid literal for int() with base 10: '3.2.0'"))

Issue script & Debug output

cli.knack.cli: Command arguments: ['iot', 'dps', 'enrollment-group', 'update', '--dps-name', 'dps-dev-*****-*****', '--enrollment-id', 'dev-amd64', '--initial-twin-tags', "{'version': '3.2.0'}", '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x108f52980>, <function OutputProducer.on_global_arguments at 0x1091371a0>, <function CLIQuery.on_global_arguments at 0x1091789a0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'iot': ['azure.cli.command_modules.iot', 'azext_iot']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: iot                       0.367        19        82
cli.azure.cli.core: Total (1)                 0.367        19        82
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: azure-iot                 0.023        97       325  /Users/*****/.azure/cliextensions/azure-iot
cli.azure.cli.core: Total (1)                 0.023        97       325  
cli.azure.cli.core: Loaded 111 groups, 407 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : iot dps enrollment-group update
cli.azure.cli.core: Command table: iot dps enrollment-group update
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x10a468220>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/*****/.azure/commands/2025-01-06.10-54-21.iot_dps_enrollment-group_update.61883.log'.
az_command_data_logger: command args: iot dps enrollment-group update --dps-name {} --enrollment-id {} --initial-twin-tags {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x10a4c5da0>]
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x10a4f0180>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x10a4f02c0>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x10a4f0360>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x109137240>, <function CLIQuery.handle_query_parameter at 0x109178a40>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x10a4f0220>]
az_command_data_logger: extension name: azure-iot
az_command_data_logger: extension version: 0.25.0
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=IotDpsClient
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/*****/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /Users/*****/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/b59be42e-a010-4cf1-b13e-d8ef879c5765
msal.authority: openid_config("https://login.microsoftonline.com/b59be42e-a010-4cf1-b13e-d8ef879c5765/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/b59be42e-a010-4cf1-b13e-d8ef879c5765/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/b59be42e-a010-4cf1-b13e-d8ef879c5765/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/b59be42e-a010-4cf1-b13e-d8ef879c5765/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/b59be42e-a010-4cf1-b13e-d8ef879c5765/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/b59be42e-a010-4cf1-b13e-d8ef879c5765/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/b59be42e-a010-4cf1-b13e-d8ef879c5765/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/b59be42e-a010-4cf1-b13e-d8ef879c5765/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_credentials: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: f7baaacc-a1da-4173-a9fb-1d81033a6e4d
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/******/providers/Microsoft.Devices/provisioningServices?api-version=2021-10-15'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '33aa6644-cc14-11ef-b580-327175d3125d'
cli.azure.cli.core.sdk.policies:     'CommandName': 'iot dps enrollment-group update'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--dps-name --enrollment-id --initial-twin-tags --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.67.0 (HOMEBREW) azsdk-python-core/1.31.0 Python/3.12.8 (macOS-15.2-x86_64-i386-64bit)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/******/providers/Microsoft.Devices/provisioningServices?api-version=2021-10-15 HTTP/1.1" 200 2075
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '2075'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '249'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '14bcf2e7-bfc6-4443-8335-43ce1c6110d4'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '14bcf2e7-bfc6-4443-8335-43ce1c6110d4'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWITZERLANDNORTH:20250106T095422Z:14bcf2e7-bfc6-4443-8335-43ce1c6110d4'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 5E5315DD3F174A9B90FF0E7B7D4FB96C Ref B: VIEEDGE2017 Ref C: 2025-01-06T09:54:21Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Mon, 06 Jan 2025 09:54:22 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"value":[{"etag":"AAAAAB+qjaE=","name":"dps-dev-*****-*****","location":"northeurope","properties":{"state":"Active","provisioningState":"Succeeded","iotHubs":[{"name":"iot-dev-*****-531a4649.azure-devices.net","connectionString":"HostName=iot-dev-*****-531a4649.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=****","location":"northeurope","authenticationType":"KeyBased"}],"allocationPolicy":"Hashed","serviceOperationsHostName":"dps-dev-*****-*****.azure-devices-provisioning.net","deviceProvisioningHostName":"global.azure-devices-provisioning.net","idScope":"0ne002AE0A8"},"resourcegroup":"rg-dev-*****-e31afecd","type":"Microsoft.Devices/provisioningServices","id":"/subscriptions/******/resourceGroups/rg-dev-*****-e31afecd/providers/Microsoft.Devices/provisioningServices/dps-dev-*****-*****","subscriptionid":"******","tags":{"Dept":"Digital","Environment":"dev","Owner":"Devops","Team":"*****"},"sku":{"name":"S1","tier":"Standard","capacity":1}},{"etag":"AAAAAB+quOk=","name":"dps-prod-*****-******","location":"northeurope","properties":{"state":"Active","provisioningState":"Succeeded","iotHubs":[{"name":"iot-prod-*****-235c5e66.azure-devices.net","connectionString":"HostName=iot-prod-*****-235c5e66.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=****","location":"northeurope","authenticationType":"KeyBased"}],"allocationPolicy":"Hashed","serviceOperationsHostName":"dps-prod-*****-******.azure-devices-provisioning.net","deviceProvisioningHostName":"global.azure-devices-provisioning.net","idScope":"0ne0030F88E"},"resourcegroup":"rg-prod-*****-9cf7a8bc","type":"Microsoft.Devices/provisioningServices","id":"/subscriptions/******/resourceGroups/rg-prod-*****-9cf7a8bc/providers/Microsoft.Devices/provisioningServices/dps-prod-*****-******","subscriptionid":"******","tags":{"Dept":"Digital","Environment":"prod","Owner":"Devops","Team":"*****"},"sku":{"name":"S1","tier":"Standard","capacity":1}}]}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/******/resourceGroups/rg-dev-*****-e31afecd/providers/Microsoft.Devices/provisioningServices/dps-dev-*****-*****/listkeys?api-version=2021-10-15'
cli.azure.cli.core.sdk.policies: Request method: 'POST'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '33aa6644-cc14-11ef-b580-327175d3125d'
cli.azure.cli.core.sdk.policies:     'CommandName': 'iot dps enrollment-group update'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--dps-name --enrollment-id --initial-twin-tags --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.67.0 (HOMEBREW) azsdk-python-core/1.31.0 Python/3.12.8 (macOS-15.2-x86_64-i386-64bit)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/******/resourceGroups/rg-dev-*****-e31afecd/providers/Microsoft.Devices/provisioningServices/dps-dev-*****-*****/listkeys?api-version=2021-10-15 HTTP/1.1" 200 229
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '229'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '199'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-global-writes': '2999'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '7b0c32e7-cbec-4a98-bc91-91647587ae9c'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '7b0c32e7-cbec-4a98-bc91-91647587ae9c'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'GERMANYWESTCENTRAL:20250106T095423Z:7b0c32e7-cbec-4a98-bc91-91647587ae9c'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 74719BD596D24795B8B8E634A49B5D76 Ref B: VIEEDGE2017 Ref C: 2025-01-06T09:54:22Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Mon, 06 Jan 2025 09:54:23 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"value":[{"keyName":"provisioningserviceowner","primaryKey":"****","secondaryKey":"":"****","","rights":"ServiceConfig, EnrollmentWrite, DeviceConnect"}]}
cli.azext_iot.common.base_discovery: Using policy 'provisioningserviceowner' for IoT Hub Device Provisioning Service interaction.
msrest.universal_http.requests: Configuring retry: max_retries=4, backoff_factor=0.8, max_backoff=90
msrest.service_client: Accept header absent and forced to application/json
msrest.http_logger: Request URL: 'https://dps-dev-*****-*****.azure-devices-provisioning.net/enrollmentGroups/dev-amd64?api-version=2021-10-01'
msrest.http_logger: Request method: 'GET'
msrest.http_logger: Request headers:
msrest.http_logger:     'Accept': 'application/json'
msrest.http_logger:     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger:     'x-ms-client-request-id': '3515ac28-cc14-11ef-b580-327175d3125d'
msrest.http_logger:     'accept-language': 'en-US'
msrest.http_logger:     'User-Agent': 'python/3.12.8 (macOS-15.2-x86_64-i386-64bit) msrest/0.7.1 msrest_azure/0.6.4 provisioningserviceclient/2021-10-01 Azure-SDK-For-Python IoTPlatformCliExtension/0.25.0'
msrest.http_logger: Request body:
msrest.http_logger: None
msrest.universal_http: Configuring redirects: allow=True, max=30
msrest.universal_http: Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http: Configuring proxies: ''
msrest.universal_http: Evaluate proxies against ENV settings: True
urllib3.connectionpool: Starting new HTTPS connection (1): dps-dev-*****-*****.azure-devices-provisioning.net:443
urllib3.connectionpool: https://dps-dev-*****-*****.azure-devices-provisioning.net:443 "GET /enrollmentGroups/dev-amd64?api-version=2021-10-01 HTTP/1.1" 200 582
msrest.http_logger: Response status: 200
msrest.http_logger: Response headers:
msrest.http_logger:     'Content-Length': '582'
msrest.http_logger:     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger:     'Date': 'Mon, 06 Jan 2025 09:54:22 GMT'
msrest.http_logger:     'x-ms-request-id': '862c3d59-4289-41cd-8735-2dae17dee446'
msrest.http_logger:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
msrest.http_logger: Response content:
msrest.http_logger: {"enrollmentGroupId":"dev-amd64","attestation":{"type":"x509","x509":{"caReferences":{"primary":"azure-iot-*****-dev-amd64.root.ca.cert"}}},"capabilities":{"iotEdge":true},"initialTwin":{"tags":{},"properties":{"desired":{}}},"etag":"IjE3MDIwOTIxLTAwMDAtMGMwMC0wMDAwLTY3N2JhODQyMDAwMCI=","provisioningStatus":"enabled","reprovisionPolicy":{"updateHubAssignment":true,"migrateDeviceData":true},"createdDateTimeUtc":"2021-05-26T13:15:16.2234852Z","lastUpdatedDateTimeUtc":"2025-01-06T09:54:10.9081321Z","allocationPolicy":"hashed","iotHubs":["iot-dev-*****-531a4649.azure-devices.net"]}
msrest.service_client: Accept header absent and forced to application/json
msrest.http_logger: Request URL: 'https://dps-dev-*****-*****.azure-devices-provisioning.net/enrollmentGroups/dev-amd64?api-version=2021-10-01'
msrest.http_logger: Request method: 'PUT'
msrest.http_logger: Request headers:
msrest.http_logger:     'Accept': 'application/json'
msrest.http_logger:     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger:     'x-ms-client-request-id': '3531a4c8-cc14-11ef-b580-327175d3125d'
msrest.http_logger:     'If-Match': '*'
msrest.http_logger:     'accept-language': 'en-US'
msrest.http_logger:     'Content-Length': '522'
msrest.http_logger:     'User-Agent': 'python/3.12.8 (macOS-15.2-x86_64-i386-64bit) msrest/0.7.1 msrest_azure/0.6.4 provisioningserviceclient/2021-10-01 Azure-SDK-For-Python IoTPlatformCliExtension/0.25.0'
msrest.http_logger: Request body:
msrest.http_logger: {"enrollmentGroupId": "dev-amd64", "attestation": {"type": "x509", "x509": {"caReferences": {"primary": "azure-iot-*****-dev-amd64.root.ca.cert"}}}, "capabilities": {"iotEdge": true}, "initialTwin": {"tags": {"version": "3.2.0"}, "properties": {"desired": {}}}, "etag": "IjE3MDIwOTIxLTAwMDAtMGMwMC0wMDAwLTY3N2JhODQyMDAwMCI=", "provisioningStatus": "enabled", "reprovisionPolicy": {"updateHubAssignment": true, "migrateDeviceData": true}, "allocationPolicy": "hashed", "iotHubs": ["iot-dev-*****-531a4649.azure-devices.net"]}
msrest.universal_http: Configuring redirects: allow=True, max=30
msrest.universal_http: Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http: Configuring proxies: ''
msrest.universal_http: Evaluate proxies against ENV settings: True
urllib3.connectionpool: Starting new HTTPS connection (1): dps-dev-*****-*****.azure-devices-provisioning.net:443
urllib3.connectionpool: https://dps-dev-*****-*****.azure-devices-provisioning.net:443 "PUT /enrollmentGroups/dev-amd64?api-version=2021-10-01 HTTP/1.1" 200 599
msrest.http_logger: Response status: 200
msrest.http_logger: Response headers:
msrest.http_logger:     'Content-Length': '599'
msrest.http_logger:     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger:     'Date': 'Mon, 06 Jan 2025 09:54:23 GMT'
msrest.http_logger:     'x-ms-request-id': '1aefae16-4fb9-4800-bfd2-f4b87398a4a8'
msrest.http_logger:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
msrest.http_logger: Response content:
msrest.http_logger: {"enrollmentGroupId":"dev-amd64","attestation":{"type":"x509","x509":{"caReferences":{"primary":"azure-iot-*****-dev-amd64.root.ca.cert"}}},"capabilities":{"iotEdge":true},"initialTwin":{"tags":{"version":"3.2.0"},"properties":{"desired":{}}},"etag":"IjE3MDI1ZjIxLTAwMDAtMGMwMC0wMDAwLTY3N2JhODRmMDAwMCI=","provisioningStatus":"enabled","reprovisionPolicy":{"updateHubAssignment":true,"migrateDeviceData":true},"createdDateTimeUtc":"2021-05-26T13:15:16.2234852Z","lastUpdatedDateTimeUtc":"2025-01-06T09:54:23.8308242Z","allocationPolicy":"hashed","iotHubs":["iot-dev-*****-531a4649.azure-devices.net"]}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1621, in deserialize_data
    data_val = self.deserialize_type[data_type](data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1867, in deserialize_long
    return _long_type(attr)
           ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '3.2.0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/*****/.azure/cliextensions/azure-iot/azext_iot/operations/dps.py", line 656, in iot_dps_device_enrollment_group_update
    return sdk.enrollment_group.create_or_update(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/*****/.azure/cliextensions/azure-iot/azext_iot/sdk/dps/service/operations/enrollment_group_operations.py", line 160, in create_or_update
    deserialized = self._deserialize('EnrollmentGroup', response)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1376, in __call__
    return self._deserialize(target_obj, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1637, in deserialize_data
    raise_with_traceback(DeserializationError, msg, err)
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1621, in deserialize_data
    data_val = self.deserialize_type[data_type](data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1867, in deserialize_long
    return _long_type(attr)
           ^^^^^^^^^^^^^^^^
azure.core.exceptions.DeserializationError: ("Unable to deserialize response data. Data: 3.2.0, long, ValueError: invalid literal for int() with base 10: '3.2.0'", ValueError("invalid literal for int() with base 10: '3.2.0'"))

cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: ("Unable to deserialize response data. Data: 3.2.0, long, ValueError: invalid literal for int() with base 10: '3.2.0'", ValueError("invalid literal for int() with base 10: '3.2.0'"))
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1621, in deserialize_data
    data_val = self.deserialize_type[data_type](data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1867, in deserialize_long
    return _long_type(attr)
           ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '3.2.0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/*****/.azure/cliextensions/azure-iot/azext_iot/operations/dps.py", line 656, in iot_dps_device_enrollment_group_update
    return sdk.enrollment_group.create_or_update(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/*****/.azure/cliextensions/azure-iot/azext_iot/sdk/dps/service/operations/enrollment_group_operations.py", line 160, in create_or_update
    deserialized = self._deserialize('EnrollmentGroup', response)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1376, in __call__
    return self._deserialize(target_obj, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1637, in deserialize_data
    raise_with_traceback(DeserializationError, msg, err)
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1621, in deserialize_data
    data_val = self.deserialize_type[data_type](data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1867, in deserialize_long
    return _long_type(attr)
           ^^^^^^^^^^^^^^^^
azure.core.exceptions.DeserializationError: ("Unable to deserialize response data. Data: 3.2.0, long, ValueError: invalid literal for int() with base 10: '3.2.0'", ValueError("invalid literal for int() with base 10: '3.2.0'"))
az_command_data_logger: ("Unable to deserialize response data. Data: 3.2.0, long, ValueError: invalid literal for int() with base 10: '3.2.0'", ValueError("invalid literal for int() with base 10: '3.2.0'"))
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1621, in deserialize_data
    data_val = self.deserialize_type[data_type](data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1867, in deserialize_long
    return _long_type(attr)
           ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '3.2.0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/*****/.azure/cliextensions/azure-iot/azext_iot/operations/dps.py", line 656, in iot_dps_device_enrollment_group_update
    return sdk.enrollment_group.create_or_update(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/*****/.azure/cliextensions/azure-iot/azext_iot/sdk/dps/service/operations/enrollment_group_operations.py", line 160, in create_or_update
    deserialized = self._deserialize('EnrollmentGroup', response)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1376, in __call__
    return self._deserialize(target_obj, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1639, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1450, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc['type'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1637, in deserialize_data
    raise_with_traceback(DeserializationError, msg, err)
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1621, in deserialize_data
    data_val = self.deserialize_type[data_type](data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/msrest/serialization.py", line 1867, in deserialize_long
    return _long_type(attr)
           ^^^^^^^^^^^^^^^^
azure.core.exceptions.DeserializationError: ("Unable to deserialize response data. Data: 3.2.0, long, ValueError: invalid literal for int() with base 10: '3.2.0'", ValueError("invalid literal for int() with base 10: '3.2.0'"))
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x10a4684a0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 3.029 seconds (init: 0.243, invoke: 2.786)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 8405 in cache file under /Users/*****/.azure/telemetry/20250106105423847
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/usr/local/Cellar/azure-cli/2.67.0_1/libexec/bin/python /usr/local/Cellar/azure-cli/2.67.0_1/libexec/lib/python3.12/site-packages/azure/cli/telemetry/__init__.py /Users/*****/.azure /Users/*****/.azure/telemetry/20250106105423847"
telemetry.process: Return from creating process 61917
telemetry.main: Finish creating telemetry upload process.

Expected behavior

Expecting Device tags in Azure IoT Hub Device Provisioning Service (DPS) > Settings > Manage enrollments > Select group > Device settings to be set to

{
    "version": "3.2.0"
}

Image

Environment Summary

azure-cli 2.67.0

core 2.67.0
telemetry 1.1.0

Extensions:
azure-devops 1.0.1
azure-iot 0.25.0
containerapp 1.1.0b1
kusto 0.5.0

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location '/usr/local/Cellar/azure-cli/2.67.0_1/libexec/bin/python'
Extensions directory '/Users/orjantornvik/.azure/cliextensions'

Python (Darwin) 3.12.8 (main, Dec 3 2024, 18:42:41) [Clang 16.0.0 (clang-1600.0.26.4)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

@orjanto orjanto added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 6, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 6, 2025

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. IoT Service Attention This issue is responsible by Azure service team. Auto-Assign Auto assign by bot IoT/CLI labels Jan 6, 2025
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-iot-cli-triage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. IoT/CLI IoT Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants