Getting Azure VM Instance ID from within a VM and linking it with imported Azure VM instances
<p>I am developing a client-server application where I want the client (Azure VM) to send its instance ID to the server. The server will use this instance ID to link it with the corresponding VM from the list of imported Azure instances (using Azure cloud credentials).</p>

<p>I am facing some problems:  </p>

<ul>
<li><p>I am using the web endpoint which the client talks to , to get its instance ID. However, as mentioned in the article (<a href="https://azure.microsoft.com/en-us/blog/what-just-happened-to-my-vm-in-vm-metadata-service/" rel="nofollow">https://azure.microsoft.com/en-us/blog/what-just-happened-to-my-vm-in-vm-metadata-service/</a>), I get empty info returned. How do I get the instance ID?    </p></li>
<li><p>From the imported VMs, I don't get any attribute which is the instance ID but rather just instance Name and Private ID along with a bunch of other information.</p></li>
</ul>

<p>I didn't have this problem for AWS as I clearly get instance ID on both sides.</p>