Microsoft Azure API not providing desired response

Srinivas Ramanujaiah 0 Reputation points
2025-01-22T08:33:21.9866667+00:00

We utilize the Microsoft-authorized Graph API (https://learn.microsoft.com/en-us/rest/api/azure-resourcegraph/) to discover the operating system and license type of virtual machines. Typically, we rely on the properties.storageProfile.imageReference.offer field in the API response to determine the operating system, such as Windows Server or RHEL. This information is essential for automatically assigning the appropriate license type to virtual machines.

However, we are observing an issue with certain virtual machines provisioned from a marketplace and then converted to a template. In such cases, the API does not return the required value on (properties.storageProfile.imageReference.offer ) to identify the operating system, as seen in the attached payload response. 

Hence, this impacts our ability to correctly assign the right license type to these virtual machines.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,029 questions
0 comments No comments
{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.