Use basic auth on on-prem api, but managed identity token auth towards Entra application proxy

126 views Asked by At

I have a on-prem api that uses username/password in header to authenticate. This is published in Entra via a application proxy, with Entra pre-authentication enabled. To give access, i have a system managed identity assigned to a APIM solution that is granted access to the application proxy. I can use the managed identity to gain access to the application proxy, but i am struggling with adding the basic-header towards the on-prem api. This is because the proxy is handling the request against the on-prem api, and therefore i cannot add the basic-auth after the request is "approved" on the application proxy.

this is the API that authenticates against the app proxy, but is missing the basic-auth

@("Bearer " + (string)context.Variables["proxy-token"])

i have tried to add this:

@("Bearer " + (string)context.Variables["proxy-token"])

But this tries to authenticate against the proxy, and i am not allowed trough.

0

There are 0 answers