Metadata api version.

Diksha Singh 60 Reputation points
2023-09-25T10:06:08.9966667+00:00

I recently encountered a change in the behavior of the Azure Metadata service when trying to access the subscription ID using different version values. Initially, my code worked well with api-version=2021-06-01, but it stopped working. However, switching to api-version=2021-02-01 resolve the issue. I'm curious about the reasons behind this change and why different api-version values led to different outcomes.

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

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 20,781 Reputation points Microsoft Employee
    2023-09-26T05:31:25.1033333+00:00

    @Diksha Singh Thanks for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    Based on the shared information, I have understood that you are using the api version 2021-06-01 to pull the instance Metadata. But as per the current documentation we see that this particular API Version is not supported.

    MicrosoftTeams-image (15)

    You can refer to this documentation for more information about the list of Supported API Versions of IMDS across different Azure Service like (Compute, Storage).

    Feel free to reach back to me if you have any further questions on this.


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.