-
|
Hi all, I'm attempting to authenticate a downstream API from a Web API. I've followed this guide to set up both projects. When the Identity package attempts to get a token for the downstream API (via either {
"error": "server_error",
"error_description": "AADSTS50000: There was an error issuing a token or an issue with our sign-in service. Trace ID: {redacted-guid} Correlation ID: {redacted-guid} Timestamp: 2025-03-11 14:06:33Z",
"error_codes": [50000],
"timestamp": "2025-03-11 14:06:33Z",
"trace_id": "{redacted-guid}",
"correlation_id": "{redacted-guid}",
"error_uri": "{redacted-uri}/error?code=50000"
}By watching the HTTP calls to the token endpoint, I can see what is being requested by the Identity package. It is adding extra scopes and an extra parameter which are causing the call to fail. The extra scopes are I'm struggling as to how I should approach debugging this. I'm also unsure if this is a problem with Entra not accepting valid inputs or (far more likely) I've mis-configured something to cause the request to have invalid parameters. Does anyone have suggestions as to where to start? I am happy to provide extra information if needed. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
In typical fashion, I have started to narrow down the problem only after asking for help. For anyone else who has this problem in the future, it appears to be related to the middle-tier API having an extension attribute claim in the token. I have yet to check if there is a workaround to still be able to use custom claims. For now though, removing them from at least the middle API allows the on-behalf-of flow to work correctly. |
Beta Was this translation helpful? Give feedback.
-
|
@vpben : even if there are custom signing keys they should be advertised by the IDP? |
Beta Was this translation helpful? Give feedback.
Thanks for sharing.
Yes, this is not about Microsoft.Identity.Web and this is a security feature.