Share via

Active Directory Authenticate API Application using Token from Client Application

Murugan Andezuthu Dharmaratnam 121 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 Security | Microsoft Entra | Microsoft Entra ID

1 answer

Sort by: Most helpful
  1. Murugan Andezuthu Dharmaratnam 121 Reputation points
    2021-08-26T14:02:53.463+00:00

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.