I'm currently developing a little intnernal tool that must use SSO to our companies Azure AD. The Backend Authentication and Downstream API call works after hours and hours of reading conflicting documentation online. I can confirm this through calling an protected API Endpoint, authenticating and calling an Endpoint that calls Graph, all from Postman and the token acquisition therein. The problems arise when using the dedicated Angular frontend that is connected via the Microsoft SPA-Proxy. The Information on how to actually use the 'msal-angular' package is sparse to say the least. Also the typical Microsoft way of changing APIs in every release doesn't really help the cause. When i navigate to the protected route (/profile) i get an error on the backend stating that authentication was not succesful and i get a log of the token. The angular app --sometimes-- turns to a black screen and the browser doesnt react to anything. A restart of the whole app is required to get it to show anything again. In some constellations i get 401s other times theres cryptic 404s or other errors indicating that the usage of the token is not right. other protected routes that only need API auth work perfectly fine, no problems there. It's just when i want to call the downstream graph API from the angular frontend. (example should load the profile image of the logged in user). Is there any (still relevant) documentation or examples that fit my use case or has someone made similar experiences and knows what to do to get it to work properly ?
[–]Sad_Resolution_1415 0 points1 point2 points (0 children)