Issue with Redirect URL Truncation in Entra ID After Authentication

K Nadeem 0 Reputation points
2024-08-29T14:30:06.2966667+00:00

After successful authentication, the redirect URL I provided in the app registration authentication section is not returned completely.

For example, in Entra ID, I provided the redirect URL as https://localhost/auth, but Entra ID returned the URL as https://localhost, truncating the /auth part from the provided URL.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,694 questions
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 24,661 Reputation points Microsoft Employee
    2024-08-29T19:20:32.9533333+00:00

    Hi @K Nadeem , this might be caused by a mismatch between the redirect URI configured in your app registration and the redirect URI specified in your authentication request. Please try the following for me:

    1. Check the redirect URI configured in your app registration in Entra ID. Make sure that it matches the redirect URI specified in your authentication request.
    2. Check the redirect URI specified in your authentication request. Make sure that it matches the redirect URI configured in your app registration in Entra ID.
    3. If the redirect URIs match, try adding a trailing slash (/) to the redirect URI in your app registration and authentication request. This can sometimes resolve issues with URL truncation.
    4. If none of the above steps resolve the issue, try using a different redirect URI in your app registration and authentication request. Make sure that the redirect URI is a valid URL and does not contain any special characters.

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James


Your answer

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