Unable to connect Azure Devops - Invalid Azure URL or Personal Access Token

  • which versions are you using (SonarQube 9.9 LTS Enterprise, Scanner 4.8, Plugin 5.13)
  • how is SonarQube deployed: installed in Azure VMwith SQ Zip file
  • what are you trying to achieve - configuring Azure devops in sonar portal
  • what have you tried so far to achieve this - Provided requested details (Azure URL and PAT)

For configuring Azure Devops with proper link and PAT, sonarqube is throwing an error as ‘Invalid Azure URL or Personal Access Token’!!!

The debug log of web.log shows the below lines

[[o.s.a.c.a.AzureDevOpsHttpClient] check pat : [https://dev.azure.com/xxxxxxx/_apis/p

rojects?api-version=3.0]

[o.s.a.c.a.AzureDevOpsHttpClient] Unable to contact Azure DevOps server for request

https://dev.azure.com/xxxxxxx/_apis/projects?api-version=3.0: [Unexpected response code for CONNECT: 400

During Service Connection configuration in Azure devops, Sonarqube plugin shows as Basic Authentication after providing Sonarqube URL and Global Analysis token, is it forcing us to use Basic auth only ??

Regards,
Sriharsha

Hi Sriharsha,

I think this thread is relevant:

 
HTH,
Ann

Hi Ann,

Thank you for the reply.

We are using Azure DevOps service

if we curl the URL
root@:~# curl -X GET “http://${URL}/_apis/projects?api-version=3.0” -u “:${PAT}”

getting authentication errors as

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="https://spsprodcus3.vssps.visualstudio.com/_signin?realm=dev.azure.com&amp;reply_to=htxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..............

We are using SAML for the Sonarqube portal login without any issues but why for DevOps it stops Authentication on the Microsoft login page?

Is there any setting in Sonarqube to disable Basic Authentication?

Regards,
Sriharsha.

After providing azure VM private IP address in sonar.properties web address, It worked !

Thanks

1 Like

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