You have an Azure virtual machine named VM1 and an Azure Active Directory (Azure AD) tenant named adatum.com.
VM1 has the following settings:
✑ IP address: 10.10.0.10
✑ System-assigned managed identity: On
You need to create a script that will run from within VM1 to retrieve the authentication token of VM1.
Which address should you use in the script?
A . vm1.adatum.com.onmicrosoft.com
B . 169.254.169.254
C . 10.10.0.10
D . vm1.adatum.com
Answer: B
Explanation:
Your code that’s running on the VM can request a token from the Azure Instance Metadata Service identity endpoint, accessible only from within the VM: http://169.254.169.254/metadata/identity/oauth2/token
Reference: https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview
Leave a Reply