Bug: Inconsistent VM id capitalisation when querying availabilityStatuses API

T Brack 1 Reputation point
2021-03-04T10:44:54.353+00:00

When querying the availabilityStatuses API over the last few days, some of the VM ids returned include lower case words and some include capitalised words. Specifically this part of the id:

/resourceGroups/groupname/providers/Microsoft.Compute/virtualMachines/

or

/resourcegroups/groupname/providers/microsoft.compute/virtualmachines/

We are recording and using these ids in a database, so having these suddenly change/ be unpredictable is problematic. To avoid having to treat the data on our end, would it be possible for these ids to be returned in a consistent format?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,080 questions
{count} votes

2 answers

Sort by: Most helpful
  1. shiva patpi 13,131 Reputation points Microsoft Employee
    2021-03-04T19:58:54.33+00:00

    Hello @T Brack ,
    Thanks for our query . Are you still seeing the same issue for the returned VMIDs ?
    I just tried the same using https://resources.azure.com/raw/ but I can see all the characters in the VMID as small case.

    74471-image.png

    74481-image.png

    Kindly let us know if you are still seeing the issues w.r.t VMIDs.


  2. shiva patpi 13,131 Reputation points Microsoft Employee
    2021-04-14T05:52:28.89+00:00

    Hello @T Brack ,
    Apologies for the delay and thank you for the clarification , I just tried to run that REST API and observed below:

    For example resourceGroups (output1) & resourcegroups (output2). I think you were referring to those scenarios .

    Output1:

    "id": "/subscriptions/subid/resourcegroups/ace-cxp/providers/microsoft.search/searchservices/acecxp-as4abnidkrxv43o/providers/Microsoft.ResourceHealth/availabilityStatuses/current"

    Output2:

    "id": "/subscriptions/subid/resourceGroups/VisualStudioVM/providers/Microsoft.Compute/
    virtualMachines/VisualStudioVM/providers/Microsoft.ResourceHealth/availabilityStatuses/current

    As I am following up internally , as an alternate work around can you try converting everything to lower case before inserting into the database.

    Regards,
    Shiva.

    0 comments No comments