Managed Identity in Windows containers works differently. IDMS token endpoint does not work in Windows containers.
Token for a KeyVault can be obtained through this (or similar) command only.
Run curl -G -v %IDENTITY_ENDPOINT% --data-urlencode resource=https://vault.azure.net --data-urlencode principalId= -H secret:%IDENTITY_HEADER%
More explanation here -> https://learn.microsoft.com/en-us/azure/container-instances/container-instances-managed-identity#managed-identity-on-windows-containers