SAML SSO login getting "You're not authorized to access this page"

Hello Experts:

I am using Developer Edition (10.8) of SonarQube hosted in AWS Linux with a Network Load Balancer at the front end. While I test SAML from within SQ GUI, it works fine but as soon as I try to access it from outside (normal SSO access from myapps) I am getting this error:

You’re not authorized to access this page. Please contact the administrator.

Reason:
The response was received at http://sq.xxx.com/oauth2/callback/saml instead of https://sq.xxx.com/oauth2/callback/saml

It may seem a config mismatch, but I checked at both IdP (Entra Id) and SQ end, I couldn’t find any config mismatch.

One of the errors I saw in web.log is: Failed to retrieve IdentityProvider for key ‘saml’.

I am not sure why the reply request is redirected to HTTP whereas it is configured as HTTPS.

Any help will be highly appreciated.
Regards.

Hey there.

Typically, this means you need to set the X-Forwarded-Proto request header to https in your load balancer config.