404 Not Found with APIM Developer Portal Callback

Craig Belton 0 Reputation points
2026-11-26T19:45:18.05+00:00

Hello, I've setup a OAuth 2.0 + OpenID Connect in my APIM instance with the Developer SKU. I've named it bpe, and I'm looking to use Authorization Code + PKCE. I've setup a client secret for the API called by this and included it in the cilent id/client secret form fields below the screenshot.

User's image

My application is imported, and in settings, I've set the 0Auth 2.0 as the security configuration:

User's image

However, whenever I go to the developer portal and attempt to use the authorization server, I get a 404:

Untitled

I've setup the redirect URLs for code-pkce accordingly; otherwise the popup says there's no redirect setup for it. I'm at a loss for how to proceed here. Any help would be greatly appreciated.

Additional troubleshooting information:

This issue occurs with both Authorization Code and Authorization Code with PKCE.

Entra ID successfully authenticates the user and generates an authorization code.

The failure occurs when the browser redirects to the APIM-generated callback URL.

The authorization request contains only a single API scope.

The callback URL is approximately 2,280 characters long.

This issue has persisted for at least one week.

Attempting to configure response_mode=form_post through the authorization endpoint URL results in an AADSTS900144 error.

I found a previously reported issue that appears to describe the same behavior:

https://github.com/Azure/api-management-developer-portal/issues/2160

This leads me to suspect that the managed developer portal may be rejecting the callback due to a query string length restriction.

Questions:

Does the managed developer portal enforce a query string length restriction on OAuth callback endpoints?

Does the managed developer portal support response_mode=form_post, and if so, how can it be configured?

Is this a known limitation or defect in the managed developer portal?

  1. Is there a supported workaround that does not require self-hosting the developer portal?Additional troubleshooting information:
    • This issue occurs with both Authorization Code and Authorization Code with PKCE.
    • Entra ID successfully authenticates the user and generates an authorization code.
    • The failure occurs when the browser redirects to the APIM-generated callback URL.
    • The authorization request contains only a single API scope.
    • The callback URL is approximately 2,280 characters long.
    • This issue has persisted for at least one week.
    • Attempting to configure response_mode=form_post through the authorization endpoint URL results in an AADSTS900144 error.
    I found a previously reported issue that appears to describe the same behavior: https://github.com/Azure/api-management-developer-portal/issues/2160 This leads me to suspect that the managed developer portal may be rejecting the callback due to a query string length restriction. Questions:
    1. Does the managed developer portal enforce a query string length restriction on OAuth callback endpoints?
    2. Does the managed developer portal support response_mode=form_post, and if so, how can it be configured?
    3. Is this a known limitation or defect in the managed developer portal?
    4. Is there a supported workaround that does not require self-hosting the developer portal?
Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.

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.