API authentication with an Azure AD SSO token

Hi
I am scripting configuration of quality profiles and quality gates via the API.
I would like to authenticate using Azure AD, as can be done for the web ui.
But the API only seems to accept a Basic token with username + password.

Is there a way to use the API with an Azure AD SSO token instead?

Hey there.

You will need to use a token generated by SonarQube. It’s not possible to use a token generated by Azure DevOps to authenticate with SonarQube.

You can read about using a token with the Web API here.

Hi Colin,
Thanks for the response.
it is Azure AD I am talking about, not Azure DevOps.
I can log into the Sonar UI with a SAML token coming from Azure AD.
I want to be able to log into the Sonar API using a SAML token coming from Azure AD

Is this possible?

Thanks

No, this isn’t possible. The Web API can only be authenticated with via SonarQube token or, when those are lacking (such as when you delegate authentication to another source), a SonarQube token.

Ok thanks - do you know if there are any plans to add this capability?

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