Forum Discussion
FlavioCampana
Jul 05, 2022Copper Contributor
Managed Identity inside docker container on linux VM
Hello I'm trying to find how to pass a managed identity assigned to a linux vm to a container running inside it, but i can't find any documentation. What should i do? Thanks
Kidd_Ip
Nov 17, 2025MVP
It cannot pass the managed identity directly into a Docker container. Instead, you expose the Azure Instance Metadata Service (IMDS) endpoint from the Linux VM to the container. The container then queries IMDS to obtain tokens for the VM’s system-assigned or user-assigned managed identity. In practice, this means mounting network access to http://169.254.169.254/metadata/identity/oauth2/token inside the container and using it to request credentials.