Azure API Management with OAuth2.0 and AAD login causes repeated loop #1306
Unanswered
manisha201301
asked this question in
Q&A
Replies: 1 comment 3 replies
-
@manisha201301 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
We have a simple web application and I am trying to use Azure API Management on top of it. Right now, I am redirecting the CName of our web application product to the apim url.
Our web application is a first party application and it performs AAD auth from
Microsoft.Identity.Web
nuget package and gets the access_token as below:string accessToken = tokenAcquisition.GetAccessTokenForUserAsync(new[] { Configuration["Scopes:<product>"] }).GetAwaiter().GetResult();
Right now, I am redirecting all the traffic (GET /* and POST /*) from the CName to the apim url.
Without the APIM usage, our Network Calls (Successful) looks like this:
However, on adding the APIM layer, our Network Calls looks like this:
Somehow the
/signin-oidc
request redirects the call tologin.microsoftonline.com/..
instead of authorizing the request and redirecting back to the root (path:'/'
) of the caller page.We get repeated loop:
apim-url => login.microsoftonline.com/consumers/.. => login.live.com/... => apim-url/signin-oidc => login.microsoftonline.com/consumers => ...
I am not sure if the redirect isn't working correctly or if the auth is not working.
Any leads would be helpful,
Thanks,
Manisha
Beta Was this translation helpful? Give feedback.
All reactions