I am having trouble getting my registered azure app (C# .Net Core application running on a user's machine) access to its client secret stored in an azure key vault. The app has been added to an azure ad group that has been given an access policy to the key vault. I feel like this should work, but it doesn't, it returns an "authentication unavailable, no managed identity endpoint found":
var creds = new ManagedIdentityCredential(clientId);
SecretClient secretClient = new SecretClient(new Uri(url), creds);
this block of code works, but only because my user account has an access policy for the key vault as well:
SecretClient secretClient = new SecretClient(new Uri(url), new DefaultAzureCredential());
Is there another step I am missing to set up my registered app or is there another method for establishing credentials using the appid/clientid?