question

muruganad avatar image
0 Votes"
muruganad asked RakeshJagatap-4451 commented

Active Directory Authenticate API Application using Token from Client Application

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.

azure-active-directoryazure-ad-authentication
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Maybe you could add some information: code, configuration for us to understand how you authorized you Front End to call the API.

You should have defined a scope in you API App Registration that the Front End App is authorized to call I guess.

0 Votes 0 ·

Hi, can you please mark your own answer as answered, Doing so helps others find answers to their questions.

0 Votes 0 ·

1 Answer

muruganad avatar image
1 Vote"
muruganad answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.