You deploy an application to an Azure virtual machine (VM). You use Secure Shell (SSH) to connect to the VM.
You need to get an access token using the assigned VM's managed identity.
To which IP address should you issue a web request?
You should issue a web request to 169.254.169.254. Specifically, the entire URL is http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com. This is the URL you should use on all VMs.
You should not issue a web request to any other IP address. Only 169.254.169.254 is available for issuing identity tokens on VMs.