Saml authentication not working in sonarqube url

Hi,
Im using sonarqube community edition 10.6 latest version. Im using Azure AD as IDP and created saml configuration with all Azure AD details.

Post saml configuration, im not able to login the sonarqube app url with saml.

Please help.

Hitting sonarqube url–>User is getting authenticated in Azure AD IDP → Getting below error instead of recieving home page.

I’m getting below error:
Sorry, but we’re having trouble signing you in.

AADSTS50011: The reply URL ‘http://localhost:9443/oauth2/callback/saml’ specified in the request does not match the reply URLs configured for the application ‘sonarqube’. Make sure the reply URL sent in the request matches one added to your application in the Azure portal. Navigate to Error AADSTS50011 - The reply URL specified in the request does not match the reply URLs configured for the application <GUID>. - Azure | Microsoft Learn to learn more about how to fix this.

Thanks,
Muhammadh

Did you read Microsoft’s documentation about the issue?

Hi, that issue is resolved now after updating the server base url in sonarqube.

Now, I’m getting below mentioned issue throwing from the sonarqube.

Please assist here.

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

Reason:
The response was received at https://localhost:9443/oauth2/callback/saml instead of https://myorg.com/oauth2/callback/saml

What are you using to serve SonarQube over HTTPS? Is it IIS (just a guess, since you’re in the Microsoft world).

These docs should help resolve the issue.

Hi, We have applied IIS level changes with required header modification and post that this issue is resolved. Thanks for the response.

1 Like