-
Notifications
You must be signed in to change notification settings - Fork 236
Description
Can I also use Managed Identity (System or user-assigned) for IDownstreamWebApi
?
Shouldn't Managed Identity the first option that should be mentioned in the documentation for the users? My proposed order would be Managed Identity
, client certificate
, client secret
.
Why do I first need to call AddMicrosoftIdentityWebApiAuthentication(IConfiguration)
then EnableTokenAcquisitionToCallDownstreamApi
and then AddDownstreamWebApi
in order to enable IDownStreamWebApi
usage? In my case a web api (not protected) calls another web api (protected) and I would like to use Managed Identity, so there should be no further configuration needed. My expectation would be something like
// For a system-assigned Managed Identity client id does not need to be passed
builder.Services.AddDownstreamWebApi(string managedIdentityClientId = null);
See also: https://github.com/MicrosoftDocs/azure-docs/issues/94620