Posts

Showing posts from June, 2020

Access tokens for several web api from one Angular application

Image
Scenario                      I have an angular app authenticated with azure AD, the same need to communicate with n no of azure ad authenticated Web Api. I don't want to maintain different client id, secret and tokens.  Solution         We are going to achieve this with scopes in app registration. Used technologies .net core 3.1 API, Angular 9 UI, MSAL for authentication. Step 1: Register 2 apps with single tenant - default directory only            1. Web Api             2. Angular UI Step 2: In web Api add scope from the left menu expose an API              1. set application ID URI            2. Add a scope - use consent admin and user. Step 3: In angular app add a platform from left menu Authentication          ...