1 of 1 people found this helpful
Looking at what Virtual Machines - List All (Azure Compute) | Microsoft Docs API offers there is little Azure knows about the operating system of the machine running within.
There is osProfile information which is more or less the setup that has been given to the installer of the operating system.
There is an optional imageReference attribute that may tell you from this OS image the machine has been created.
But there seems to be nothing available to provide you the ability to inspect the values from the living system.