Unable to connect Angular 8 app call a custom web api authorize endpoint authenticated from Azure AD

423 Views Asked by At

I have an Angular 8 app hosted inside an Azure App Service, that I have got authentication using MSAL and the tokens are being passed to another Azure App Service which is hosting my custom web api (.net core 3.1).

I call a not authorized endpoint and it works, but when I call an authorized end point I get different errors, latest one coming is

System.InvalidOperationException: IDX20803: Unable to obtain configuration from: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]

I have configured App Registrations for both apps with implicit grant enabled and Id and access tokens are also enabled, and its a multitenant application.

API Config

enter image description here

enter image description here

Angular config

enter image description here

1

There are 1 best solutions below

1
On

Please check your API for token validation logic. Also make sure token in getting sent in request header.