This link describes how to retrieve the token for a specific managed identity, if a VM is configured with multiple identities.
What is the behavior if the identity is not specified in the request? For which identity is the token returned? Is it for the system identity, or for the first user identity, or for the first identity that was configured on the VM, or something random?