Angular: Login user with Azure

Discussão em 'Angular' iniciado por pop, Agosto 7, 2025.

  1. pop

    pop Guest

    Our use case seems to be somewhat different from what is normally described in the docs, but I might be wrong here, too.

    So the setup is as follows: We have two apps (APIs) which are hidden behind a reverse proxy which in turn authenticates itself with Azure. To be able to communicate with an API I need to get correct credentials from Azure. I've added an Angular interceptor to add "Authentication" header for all API requests, but now on my first try to request an API endpoint - abc.intern/endpoint - the interceptor receives an error message with the code HTTP200 -> not an application/json content type (as expected) but a text/html page which is basically the mask where the user can log in.

    Now what I don't understand is how do I get my bearer token (or cookie, or whatever it is Azure gives back) in this work flow?
    Or should I just use @azure/msal-angular package for that?

    Any and every idea is appreciated.

    Continue reading...

Compartilhe esta Página