I managed to delete the route and endpoint through the CLI using the --force
flag
Can't edit my IoT Hub resource
I created an IoT Hub resource and a Blob Storage account. Messages to the iot hub are routed to an Azure function (through the built in message routing) and to the blob storage.
To set this up I had to create 2 routes in Hub Settings > Message Routing.
I moved the iot hub and the blob storage to a new resource group for organisation, and now I can't edit any of the settings such as Security Settings > Networking or Security Settings > Identity or Hub Settings > Message Routing. When I try I get an error:
"Cannot establish connection using the provided credentials:iot-hub-backup"
iot-hub-backup
is the name of the endpoint in Message Routing that sends iot messages to blob storage.
I tried simply deleting the route and I get the same error. I have also given the IoT Hub system identity Storage Blob Data Contributor
role. I have temporarily given unrestricted network access (no ip filters) both both blob storage and iot hub resources.
From research it seems that the iot hub can't validate the route and therefore won't let me change any settings, including deleting the route so I've locked myself out of being able to edit anything.
Can anyone help me figure out how to fix the route? (or delete it if necessary)
2 answers
Sort by: Most helpful
-
Gary 0 Reputation points
2025-04-15T14:01:31.3866667+00:00 -
Manas Mohanty 3,125 Reputation points Microsoft External Staff
2025-04-15T16:18:50.71+00:00 Hi Gary
Glad to hear that you were able to delete message route endpoint through CLI --force flag.
It seems permission has not been layered to transferred resources yet.
Could you reassign yourself as contributor from IOT hub , Virtual network and Storage account from IAM section and do a force update to sync the changes.
az iot hub update -n MyIotHub --sku S2 --resource-group <rgname>
You can re-create the message endpoint through CLI command mentioned here.
https://learn.microsoft.com/en-us/cli/azure/iot/hub/message-endpoint/create?view=azure-cli-latest
Thank you.