Azure AD authentication - code parameter too long ?

Hello to All,

I'm still new in the OS platform, and I have a question that I hope someone can help me. I'm using Microsoft Login Connector for authentication and when I receive the response from Azure (code and state parameters), the browser always gives the following error without never going to the preparation of the CallBack page:

The URL looks like this:


If I change the value of code parameter to a shorter string (ex: "dfdfhdj") and hit ENTER, the page loads and preparation starts. Any idea what's wrong ?

Thank you in advance.

Best Regards,

Ricardo Pereira

Rank: #397

I had the same problem. First check if the callback url in azure and in your application is exactly the same.

And more thing, when u click on authenticate button in your web app, is it going to microsoft auth login? And from there r u able to login with your Microsoft credential?

Rank: #397

I think in your azure AD app you set the call back page as AzureADResponse.aspx where as in your aplication the is no page like this. Can you check it?

Hi All,

Any ideias anyone ?

Still haven't solved this issue. Thank you.

Best Regards,

Ricardo Pereira

Hi António,

Thank you for your response.

Yesterday I opened a case to Outsystems Support. Waiting for their answer.

I'm in a personal environment. Already tried to change that value because of this article:


also used module "Factory Configuration" to try to change that value (since I don't have access to IIS) with no sucess also.

So the problem remains.

I'm using now Fiddler to see if I can get some answer.

Anyway, if someone get the answer hope you can share with us.

Thank you.

Best Regards,

Ricardo Pereira

Rank: #31581

Any update on this Ricardo?

We're facing a similar issue where the Auth Code is too long so the redirect page returns a 404. If i trim the AuthCode down in the URL it works fine. 

Currently on a personal environment, but moving to cloud soon.

Getting the exact same issue, shorten the code and works fine. Interesting thing is the code length changes drastically between environments, in our dev environment the code returns 942 characters, in our test and qa it returns 1088 and 1093 respectively, cutoff seems to be somewhere above the 1024 mark.

Will try raising a support request