94
Views
9
Comments
Azure AD authentication - code parameter too long ?
Question

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:

https://rmpp.outsystemscloud.com/MicrosoftLoginConnector/AzureADResponse.aspx?code=AQABAAIAAAAP0wLlqdLVToOpA4kwzSnx1NduoTHlU0qzV5z4DMyQdLEA8yMSb8kcn90WkxIa0-XLONT1HM-AbnqyZ1H6cAUyS0718q63pMLyAZ7ATTFoh5R2IV_dECGVVO4C7PkYpX1IAhb0j_NVN3jz5kPdN4rpjqXtiUAy1EwVG05Fx_ak6ahmg7lOn6GVugL_U1-dnUFm-bhzcKtOwZX7I0UJOiYuHjReEdIf8q5KoQHqjLeBoaEVDY9L04JdyqdZsXR3vr9Uhd8Kf2I1FlRPz2gS0LmFUs7-4k2-PHOZaae6rQKS2s3CgQ0_9xCV5t8dOSlvphdoSyCV4nzHAu9ujCtWKUB8pzQysTA0BNFM_FSP6n0Qy-z_ji1Ax1DwCKqlkdLKLZ2TS4Fmod9c0bRy5QKeWP1xurH9yZogdjeSEKvbkvdzB6Opur361TOiTWw5JJ6zF7dqBX195uyQbnleeFhjjFl_OVFc7st20ogpYrqMPY9aaGWpjsW7hTX02RMiJKmnlicJySYljGTK0qFBnVyDocPPAhS3OAhX9nrrYQJ5n_F8qqAQ1ugH7juuOv9lpwPtviTI2AzpyqUyRS8jWkvj56e66Fdj4_WcFVoGGVnM8IV6jVmZhDF2nxld0ApsfjVTYGUOjQSgJBG7w7wX6K1rLT7MFavR9Fm4Kbdoo4Uv3J8kCJrVAys7MUcuZ6lYitzJeW7IhmRjdUFIw1MGeWEKxesT6q6OgmgAKk0-95XGS3qf-jY-MaMk4Rte9bD07K1IjIjMDj7c0MopTBDSsSR-M-2y8VBIqnu0vvoDzwghSCnsAlLdSvqV9Edsz5X4L8nFeUkOMJZ8v3mosNhpA1v5_54V-EcKw3M4mT_gVSxR_b1JEJ4lSWqcuQy_aSU_3IPsAomQaqqesF5dFWO89jN0dN9sSu2VQJr6A29neHDxEJhQE_H-2dafI6EprHxXQeWcgboyqQH_zQg7kpPN2VORvf2buBHNSZcCZA1MczZMxBI_boBiREmatR_dS0O8n3CAdbraZdDp1Fxl06JyQZfMasN0dYOEwJ240hJwkBJP_RwkD55oPhD1H5cRMSaM3nk1raQBYoIvDAj8wIYekURBV--lctdV__HQVhQd3uF-m5nxYaFko8REHnPVj1O7XrVNqN94y63zXLLqxUvSUWWujXkMKJmSc2vhIQ9ckcZ0ccsmjd8j60RJUh04yz0i9lglLZ4gAA&state=07b4cc29-e1b4-4062-9aa7-b6a5ed125e49&session_state=81abe640-55cb-4f60-bafb-9d0f0ee39a19

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:

https://www.saotn.org/the-length-url-request-exceeds-configured-maxurllength-value/

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