The token you provided doesn't have sufficient rights to check license -1022

I have an instance of SonarQube running with a SQL database as it’s back-end, tied into Azure DevOps with a new PAT. The PAT has full rights, and the SonarQube admin centre is visible to the VM i’m running DevOps through, however when a build pipeline is run the above error occurs. We’ve not upgraded to the latest version yet due to initial set-up problems, so the version we’re running is 9.4 build 54424. As i said the token is new with full rights, (after initially trying with just the required ones.
Anyone any further ideas as to what may need to be changed to get this to work.
Thanks

Here’s a print of the error we recieve:

11:08:23.092 Updating build integration targets…
##[error]11:08:23.295 The token you provided doesn’t have sufficient rights to check license.
##[debug]Processed: ##vso[task.logissue type=error;]11:08:23.295 The token you provided doesn’t have sufficient rights to check license.
11:08:23.295 The token you provided doesn’t have sufficient rights to check license.
##[error]11:08:23.295 Pre-processing failed. Exit code: 1
##[debug]Processed: ##vso[task.logissue type=error;]11:08:23.295 Pre-processing failed. Exit code: 1
11:08:23.295 Pre-processing failed. Exit code: 1
##[debug]Exit code 1 received from tool ‘D:\a_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.8.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
##[debug]STDIO streams have closed for tool ‘D:\a_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.8.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
##[debug]task result: Failed

Hey there.

Can you share your Azure DevOps pipeline configuration?

Task 1 - Prepare analysis on SonarQube
Task 2 - .NET Core - build solution
Task 3 - Run code Analysis
etc.
Screenshot sonarqube analyis

Task 1 see above

Hey there.

Are you sure you’ve provided a SonarQube token (generated in SonarQube) to the service endpoint, rather than an Azure DevOps one?

Hi Colin,

I’m embarrassed to say I must have mixed up the PAT and SonarQube tokens, in my head when i was creating the service endpoint. This problem is now resolved.
Thanks for the help

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