Azure – Error trying to get access token for system-assigned managed identity
I am trying to acquire an access token for the system-assigned managed identity of my web app. Here's the code I tried: DefaultAzureCredential cred = new DefaultAzureCredential(new DefaultAzureCredentialOptions() { ManagedIdentityClientId = Constants.ManagedIdentityId, }); var accessToken = cred.GetToken(new TokenRequestContext(new[] { "https://management.azure.com"…