2

I need some help with implementing authorization infrastructure for my application.

I have a Angular SPA application that works with a Web API. This Web API in turns uses another Web API to serve its request. So, I have totally 2 Web APIs and a Angular SPA application.

I want the users of the Angular SPA application to be authenticated by our Azure AD account, and then share this token with other two Web APIs to authenticate the requests.

Please advise how to go about it, any thoughts are much appreciated.

Tony Ju
  • 14,891
  • 3
  • 17
  • 31
dks
  • 151
  • 1
  • 13

1 Answers1

4

So the flow looks like:

1.Sign-in the user in the SPA application.

2.Acquire a token to A Web API and call it.

3.A Web API then calls B Web API.

Take a look at this sample. It uses the On-Befalf-Of flow which applies to your scenario.

Tony Ju
  • 14,891
  • 3
  • 17
  • 31
  • hello Caiyi, can you please share the sample link again. for some reason it seem to be not loading. thanks – dks Jul 15 '19 at 06:23
  • Please help me on this. I understand that the client will prompt for username and password. Is there anyway that you can simply type the credentials or pass it whatever way to get a token? – hiFI Sep 17 '20 at 10:39