Skip to content

[Feature Request] Managed Identity support in IDownstreamWebApi / IDownstreamApi #1775

@Rookian

Description

@Rookian

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions