Unauthorized access error when connecting with Okta App via SAML

  • which versions are you using : SonarQube Community 9.9
  • what are you trying to achieve : OKTA SSO Using SAML
  • what have you tried so far to achieve this :

Experiencing the same issue as the post above. I am getting an “unauthorized” error page after attempting to access Sonarqube App within Okta.

Screen Shot 2023-03-29 at 3.06.40 PM

When I click “Home” it takes me to the projects tab within my sonarqube.

When I click “Log in” on the top right I am able to reach the correct page displaying the "Log in with SAML " button.

Screen Shot 2023-03-29 at 3.09.24 PM

Has anyone else encountered this error? I’d like for Okta to reach the “Log in with SAML” page without having to jump through the hoops.

The fix mentioned in the linked post above in which the resolution was effectively to
Setting the Single sign-on URL within Okta SAML Integration to https://sonarqube.mycompany.com/sessions/init/saml

and setting the Other Requestable SSO URLs in Okta to https://sonarqube.mycompany.com/oauth2/callback/saml did not work for me.

(Note: I did replace the url with my SonarQube.)

BTW. This documentation also fails to mention to set the Provider Name to SAML
Else the “Log in with SAML” button will not display correctly.


What do you see in the network tab of your browser’s developer tools when this is going on?



Anytime I click on the app within Okta i’m unable to get anything of use to show up within the network tab of the dev tools. I think this is because it opens the link in a new tab.

I haven’t changed anything since this post, but the Projects screen is now showing up momentarily and automatically redirects to the “SAML button” screen after clicking “home”. So it seems l am now having the exact same issue as the linked post.

So, after the linked post issue was replicated 1:1; I applied the recommended changes to the SAML Integration Settings within the second step on the Okta side.

Single Sign On, Recipient, and Destination URL should be set to:

“Show advanced settings” > Other Requestable SSO URLs
URL should be set to what the official documentation says:
and the index set to 0.


Is this working for you now? Sorry, but it’s not clear to me.


Hi Ann, yes it works now.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.