-
Notifications
You must be signed in to change notification settings - Fork 3.4k
az resource update fails to add ip filter rules of an IotHub #31631
Copy link
Copy link
Open
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Assignees
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
Hi I would like to add IP filter rules to IotHub, which has its

Public network accessconfigured toAll networksusing az cli.See the image below.
I need az cli command to change from
All networkstoSelected IP rangesWhen I follow the documentation to add new IP filter, I always get an error message saying
Related command
az resource update -n $iotHubName -g $resourceGroup --resource-type Microsoft.Devices/IotHubs --add properties.networkRuleSets.ipRules "{"action":"Allow","filterName":"filterName","ipMask":"10.39.6.128/25"}"
Errors
(400059) Request body validation failed. If you contact a support representative please include this correlation identifier: 7c8311d2-683e-43d1-8de1-3e19c72251a5, timestamp: 2025-06-10 11:14:04Z, errorcode: IH400059.
-43d1-8de1-3e19c72251a5, timestamp: 2025-06-10 11:14:04Z, errorcode: IH400059.
Code: 400059
Message: Request body validation failed. If you contact a support representative please include this correla-43d1-8de1-3e19c72251a5, timestamp: 2025-06-10 11:14:04Z, errorcode: IH400059.
Issue script & Debug output
debug log.txt
Expected behavior
I would expect the
az resource updateadds IP ranges to the Iot Hub network accessEnvironment Summary
azure-cli 2.72.0 *
core 2.72.0 *
telemetry 1.1.0
Extensions:
azure-iot 0.26.0
gallery-service-artifact 1.0.0b1
Dependencies:
msal 1.32.3
azure-mgmt-resource 23.1.1
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\E1252566.azure'
Extensions directory 'C:\Users\E1252566.azure\cliextensions'
Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
No response