Menu

1 / 5

Adding a Second User-Assigned Managed Identity to an Azure VM Breaks Apps That Never Named Their Identity

DEV Community: azure·KBY Technologies·about 2 hours ago
#8QiVkbEX
#devtoazure#devto#dev#identity#application
Long article (1482 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published on KBY Technologies .

If you ship code to Azure virtual machines that fetch tokens from the Instance Metadata Service, this is a trap that hits you the day someone else attaches a second user-assigned managed identity to the same VM. We cover which of your apps and scripts are exposed, the read-only commands that show it, and how to fix it without adding a system-assigned identity or a client secret.

Symptom

An application on an Azure virtual machine that has read from Key Vault or Storage for months stops getting tokens. The change that day was routine: someone attached a second user-assigned managed identity to the VM so another workload could use it. The first identity and its role assignments are untouched. The application never said which identity it wanted, and with one user-assigned identity it didn’t have to. With two, the Instance Metadata Service (IMDS) has to be told which one to use, so the token request fails.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.