Sensitivity Issue with Resource ID in Azure SDK API Calls

Maayan Dugma 20 Reputation points
2024-12-23T07:28:38.6866667+00:00

I am writing to report an issue we have encountered with the Azure SDK when making API calls to retrieve resource information.

There appears to be an inconsistency in how resource names are handled in the Resource IDs, particularly regarding case sensitivity.

For example, in the SDK call "NetworkManagementClient(token, subscription_id).subnets.list", which retrieves the details of all subnets under the same virtual network, the subnet id sometimes contains a capital "P" ("Production") and other times a lowercase "p" ("production").

This discrepancy causes issues in our processes that rely on accurate and consistent resource identification. To provide further clarity, here are two examples:

in python the library azure.mgmt.network:

Incorrect subnet ID which returned by the SDK call: /subscriptions/{number}/resourceGroups/RG-Prodnet/providers/Microsoft.Network/virtualNetworks/Production

 

Correct subnet ID: /subscriptions/{number}/resourceGroups/RG-Prodnet/providers/Microsoft.Network/virtualNetworks/production
Additionally, as shown in the attached image, you can see the output of all the subnet ids returned by the sdk call of "NetworkManagementClient(token, subscription_id).virtual_networks.list_all", which retrieves the list of all virtual networks and their associated subnets.

As you can see, the subnet ID sometimes contains a capital "P" ("Production") and other times a lowercase "p" ("production")

Thanks,
Maayan

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,572 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.