Unable to link in Azure Devops using PAT with Sonar Cloud

Hi,

I noticed that my organization shows an invalid PAT in SonarCloud. I reviewed it and everything seems correct, but I’m still getting the same message.

I also generated a new token, but when I try to use it I receive the following error:

AUTH: Failed authentication, the token used is likely not valid.

How can I resolve this issue?

Thanks.

Hi,

I notice you said you reviewed the token, not that you renewed it. Is the token from a technical user account or from a real human - that logs in to ADO on a regular basis? ADO invalidates PATs for users that haven’t logged in in 30 days.

 
Ann

Hi,

Yes, I’ve reviewed the token which expires in more than 3 moths, I’ve tested it with a “git” and it works normally. Also, I’ve created a new one with my personal account to test, but it fails too.

Chris.

Hi Chris,

Thanks for the further detail. I’ve flagged this for folks with more access.

 
Ann

Hi Ann,

I understand. In the meantime, could you recommend a workaround to reconnect the organization?

Chris

Hi,

You’ve tried replacing the PAT, right?

 
Ann

Ann,

Yes, I created a new PAT with other account, but it showed the message:

AUTH: Failed authentication, the token used is likely not valid.

Chris

Hi Chris,

And you’re absolutely sure you’ve granted your PATs all the necessary permissions, right?

If that’s the case, then unfortunately I’m afraid I don’t have a workaround for you.

 
Ann

Hi Ann,

Yes, I’m absolutely sure. I just went through the process again.

PAT:

Sonar:

Chris.

Hi Chris.

Could you please share a screenshot of your PAT configuration in Azure DevOps showing the selected scopes?

Also, when creating the PAT, did you scope it to “All organizations” or to a specific organization?

Regards,
David.