Hi @Praveen U (PUU) ,
To call one web API from another web API, both protected by Azure AD B2C, you can follow these steps:
- Register both web APIs in Azure AD B2C: Register each web API as an application in your Azure AD B2C tenant, and configure their respective scopes.
- Grant permissions: Grant the first web API (the one called by the Angular app) permissions to access the second web API's scopes.
- Acquire an access token: When the Angular app calls the first web API, it should include an access token in the request. The first web API can then use this token to request another access token with the required scopes for the second web API.
Call the second web API: The first web API can now call the second web API using the acquired access token. Include the access token in the Authorization
header of the request to the second web API.
Here's a high-level overview of the process:
- Angular app acquires an access token for the first web API's scopes.
- Angular app calls the first web API with the access token.
- First web API acquires an access token for the second web API's scopes using the received token.
- First web API calls the second web API with the new access token.
If you've already begun the process and are stuck please let me know how I can help. Please let me know if you have any questions and I can help you further.
If this answer helps you please mark "Accept Answer" so other users can reference it.
Thank you,
James