I have an arc enabled Windows Server 2022.
Im using DefaultAzureCredential and trying to use the Azure assigned managed identity to Authenticate to Azure key vault (and also azure storage at some stage)
I've populated the environment variable AZURE_CLIENT_ID + AZURE_TENANT_ID with the Id of this managed identity (object id of the managed identity shown to me in Entra ID) and you can see the other related environment variables:
But on starting the windows service I just get:
AuthenticationFailedException. User assigned managed identity is not supported by the detected managed identity environment
SO confused - I thought this was supported in Arc enabled servers? If this is not the way to do it in the Porgram startup, then how is it done? Im trying to not use the AZURE_CLIENT_SECRET
The code to get the secrets is just basic:
var client = new SecretClient(new Uri(vaultUrl), new DefaultAzureCredential());
var secretList = client.GetPropertiesOfSecrets();