Active Directory Authenticate API Application using Token from Client Application

Murugan Andezuthu Dharmaratnam 116 Reputation points
2021-08-19T11:28:43.327+00:00

I have an asp .net core 5.0 mvc application (Front End App) that authenticates using Active Directory. I have another asp .NET core 5.0 mvc web api application (API App) which also authenticates using AD. Once authenticated in Front End App, I am getting the jwt token. I would like to pass this JWT token to API App and get authenticated.

[Front End App] (Token From Front End App)=> [API App]

I am able to get this to work if I register a single app in Active Directory. But It does not work if I register It as two applications in AD.

I am getting this error.

Bearer error="invalid_token", error_description="The audience 'api://a70639ed-6587-43f0-86a7-9d0e2fda5fff' is invalid"

Would be thankful If some one can help with an answer.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,473 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Murugan Andezuthu Dharmaratnam 116 Reputation points
    2021-08-26T14:02:53.463+00:00
    1 person found this answer helpful.
    0 comments No comments