Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We have deployed TRE, but not able to authenticate API from .Net core application #65

Closed
shrasoni opened this issue Mar 6, 2023 · 1 comment

Comments

@shrasoni
Copy link

shrasoni commented Mar 6, 2023

We have deployed TRE, but not able to authenticate API from .Net core application while, authenitcation the Api
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: 'AADSTS500131: Assertion audience does not match the Client app presenting the assertion. The audience in the assertion was Client id and the expected audience is 'api:// apid or one of the Application Uris of this application with App ID. The downstream client must request a token for the expected audience (the application that made the OBO request) and this application should use that token as the assertion

Please suggest solution for above error.

@marrobi
Copy link
Member

marrobi commented Mar 8, 2023

As this does not relate to any code in our repositories we are unable to offer support.

However the error explains the issue:

The audience in the assertion was Client id and the expected audience is 'api:// apid or one of the Application Uris of this application with App ID. The downstream client must request a token for the expected audience (the application that made the OBO request) and this application should use that token as the assertion

Looks like the audience you are using does not match the app ID, the ID can be found as follows:

image

@marrobi marrobi closed this as completed Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants