SonarQube Cloud Authentication Issues

My Sonar Cloud integration just started failing:

SonarScanner for MSBuild 10.3
Using the .NET Core version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
08:52:17.508  Updating build integration targets...
08:52:18.916  Using SonarCloud.
08:52:19.402  Fetching analysis configuration settings...
Unhandled exception. System.Net.Http.HttpRequestException: Response status code does not indicate success: 403.
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.TryDownloadIfExists(String url, Boolean logPermissionDenied)
   at SonarScanner.MSBuild.PreProcessor.WebServer.SonarWebServer.DownloadQualityProfile(String projectKey, String projectBranch, String language)
   at SonarScanner.MSBuild.PreProcessor.PreProcessor.FetchArgumentsAndRuleSets(ISonarWebServer server, ProcessedArgs args, BuildSettings settings)
   at SonarScanner.MSBuild.PreProcessor.PreProcessor.DoExecute(ProcessedArgs localSettings)
   at SonarScanner.MSBuild.PreProcessor.PreProcessor.Execute(IEnumerable`1 args)
   at SonarScanner.MSBuild.BootstrapperClass.PreProcess()
   at SonarScanner.MSBuild.BootstrapperClass.Execute()
   at SonarScanner.MSBuild.Program.Execute(String[] args, ILogger logger)
   at SonarScanner.MSBuild.Program.Execute(String[] args)
   at SonarScanner.MSBuild.Program.Main(String[] args)
   at SonarScanner.MSBuild.Program.<Main>(String[] args)
/home/runner/work/_temp/82c1baa8-9118-47af-8273-d176cfc85cd0.sh: line 12:  2339 Aborted

I initially thought that my token had expired. So I logged into the web UI to check the configuration. If I navigate to Projects > My Project Name > Administration > Analysis Method, that works fine. However, if I click on With GitHub Actions it redirects me to the Sonar login screen. If I choose my SSO provider (GitHub) then it starts to load Sonar Cloud and then redirects me back to the login screen again. If I select Go back to homepage I am still authenticated, but I cannot get to the page I want.

This all seems eerily connected.

10 Likes

Having this same issue with Gitlab, so +1 on this.

2 Likes

We are experiencing the same issue on our side, and our pipelines were working earlier as well. When trying to create a new token, thinking it had expire,d we experienced the same issue of being redirected back to login and informed we were unauthenticated.

4 Likes

+1 on this.

Also, fails to create a token at UI POST ``https://sonarcloud.io/api/user_tokens/generateand delete token.

Same on Azure Devops.

2025-09-30T09:16:20.9655383Z ##\[section\]Starting: Prepare analysis on SonarCloud
2025-09-30T09:16:20.9664440Z ==============================================================================
2025-09-30T09:16:20.9664582Z Task         : Prepare Analysis Configuration
2025-09-30T09:16:20.9664679Z Description  : Prepare SonarQube Cloud analysis configuration
2025-09-30T09:16:20.9664784Z Version      : 3.4.1
2025-09-30T09:16:20.9664865Z Author       : sonarsource
2025-09-30T09:16:20.9664946Z Help         : [More Information](https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarcloud-extension-for-azure-devops/)
2025-09-30T09:16:20.9665091Z ==============================================================================
2025-09-30T09:16:21.3845445Z \[INFO\]  SonarQube Cloud: Server version: 8.0.0.67857
2025-09-30T09:16:21.3900263Z \[command\]D:\\a_work_tasks\\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\\3.4.1\\classic-sonar-scanner-msbuild\\SonarScanner.MSBuild.exe begin /k:— /o:—
2025-09-30T09:16:21.4682127Z SonarScanner for MSBuild 10.3
2025-09-30T09:16:21.4683800Z Using the .NET Framework version of the Scanner for MSBuild
2025-09-30T09:16:21.5160176Z Pre-processing started.
2025-09-30T09:16:21.5181395Z Preparing working directories…
2025-09-30T09:16:22.0020616Z 09:16:21.996  Updating build integration targets…
2025-09-30T09:16:22.4424142Z 09:16:22.434  Using SonarCloud.
2025-09-30T09:16:22.8454381Z 09:16:22.841  The JRE provisioning is a time consuming operation.
2025-09-30T09:16:22.8455028Z JRE provisioned: OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip.
2025-09-30T09:16:22.8455470Z If you already have a compatible java version installed, please add either the parameter “/d:sonar.scanner.skipJreProvisioning=true” or “/d:sonar.scanner.javaExePath=”.
2025-09-30T09:16:24.5246061Z 09:16:24.514  Fetching analysis configuration settings…
2025-09-30T09:16:24.7527277Z
2025-09-30T09:16:24.7528512Z ##\[error\]Unhandled Exception:
2025-09-30T09:16:24.7549843Z ##\[error\]System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 ().
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.d__5.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.PreProcessor.WebServer.SonarWebServer.d__17.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at SonarScanner.MSBuild.PreProcessor.PreProcessor.d__9.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.PreProcessor.PreProcessor.d__7.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.PreProcessor.PreProcessor.d__6.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.BootstrapperClass.d__9.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.BootstrapperClass.d__8.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.Program.d__4.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.Program.d__3.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.Program.d__2.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.Program.(String[ ] args)
2025-09-30T09:16:24.7556904Z System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 ().
2025-09-30T09:16:24.7557439Z    at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
2025-09-30T09:16:24.7557956Z    at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.d__5.MoveNext()
2025-09-30T09:16:24.7558481Z — End of stack trace from previous location where exception was thrown —
2025-09-30T09:16:24.7558965Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-09-30T09:16:24.7559487Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2025-09-30T09:16:24.7560056Z    at SonarScanner.MSBuild.PreProcessor.WebServer.SonarWebServer.d__17.MoveNext()
2025-09-30T09:16:24.7560586Z — End of stack trace from previous location where exception was thrown —
2025-09-30T09:16:24.7561069Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-09-30T09:16:24.7561571Z    at SonarScanner.MSBuild.PreProcessor.PreProcessor.d__9.MoveNext()
2025-09-30T09:16:24.7562083Z — End of stack trace from previous location where exception was thrown —
2025-09-30T09:16:24.7562566Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-09-30T09:16:24.7563070Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2025-09-30T09:16:24.7564881Z    at SonarScanner.MSBuild.PreProcessor.PreProcessor.d__7.MoveNext()
2025-09-30T09:16:24.7565785Z — End of stack trace from previous location where exception was thrown —
2025-09-30T09:16:24.7566536Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-09-30T09:16:24.7567718Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2025-09-30T09:16:24.7568472Z    at SonarScanner.MSBuild.PreProcessor.PreProcessor.d__6.MoveNext()
2025-09-30T09:16:24.7568979Z — End of stack trace from previous location where exception was thrown —
2025-09-30T09:16:24.7569459Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-09-30T09:16:24.7570298Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2025-09-30T09:16:24.7571020Z    at SonarScanner.MSBuild.BootstrapperClass.d__9.MoveNext()
2025-09-30T09:16:24.7571659Z — End of stack trace from previous location where exception was thrown —
2025-09-30T09:16:24.7572106Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-09-30T09:16:24.7572747Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2025-09-30T09:16:24.7574469Z    at SonarScanner.MSBuild.BootstrapperClass.d__8.MoveNext()
2025-09-30T09:16:24.7574970Z — End of stack trace from previous location where exception was thrown —
2025-09-30T09:16:24.7575466Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-09-30T09:16:24.7576001Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2025-09-30T09:16:24.7576483Z    at SonarScanner.MSBuild.Program.d__4.MoveNext()
2025-09-30T09:16:24.7577233Z — End of stack trace from previous location where exception was thrown —
2025-09-30T09:16:24.7577985Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-09-30T09:16:24.7578552Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2025-09-30T09:16:24.7579726Z    at SonarScanner.MSBuild.Program.d__3.MoveNext()
2025-09-30T09:16:24.7580496Z — End of stack trace from previous location where exception was thrown —
2025-09-30T09:16:24.7581027Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-09-30T09:16:24.7583740Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2025-09-30T09:16:24.7584628Z    at SonarScanner.MSBuild.Program.d__2.MoveNext()
2025-09-30T09:16:24.7585475Z — End of stack trace from previous location where exception was thrown —
2025-09-30T09:16:24.7586450Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-09-30T09:16:24.7587343Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2025-09-30T09:16:24.7588221Z    at SonarScanner.MSBuild.Program.(String[ ] args)
2025-09-30T09:16:24.7588735Z
2025-09-30T09:16:24.7640830Z ##\[error\]\[ERROR\] SonarQube Cloud: Error while executing task Prepare: The process ‘D:\\a_work_tasks\\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\\3.4.1\\classic-sonar-scanner-msbuild\\SonarScanner.MSBuild.exe’ failed with exit code 3762504530
2025-09-30T09:16:24.7643330Z ##\[error\]The process ‘D:\\a_work_tasks\\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\\3.4.1\\classic-sonar-scanner-msbuild\\SonarScanner.MSBuild.exe’ failed with exit code 3762504530
2025-09-30T09:16:24.7774860Z ##\[section\]Finishing: Prepare analysis on SonarCloud

Edit: Formatting

Same issue on Azure DevOps for us

likely related issue

https://community.sonarsource.com/t/unable-to-create-new-security-token-under-my-account/149549/7

Currently I cannot create new Tokens in the SonarCloud.io admin site, to use in an Azure DevOps service connection.

When I use My Account > Security to create a new account, i am redirected to the login page again.

I tried the new Org Token feature as well: get an “internal server error”. Later the entry with the name I chose is shown in the list of org tokens but I see no way to get the token itself.

Our Sonar Analyze steps are failing in our Azure DevOps yaml pipelines.

Any ideas?

I tried “in private” browser sessions to avoid any Browser caching issues on sonarcloud.io - did not help either. User token creation leads me back to the login page.

This is urgent for us!

We have an Enterprise license.

Hello, I am attempting to create a new security token within SonarQube Cloud by going to My Account => Security, entering a token name and then clicking on Generate Token.

When I do this it takes me to the login page saying “You are not authenticated. Please log in and try again”. I login again (with GitHub) and I am back at the Security page but with no token generated. If I try again I get the same issue.

Please could you advise.

Could be related to the fact that some API endpoints started returning 403 this morning. Azure DevOps service connection can’t verify (403). SonarCloudPrepare pipeline task also fails with 403

I’m having the same issue. When I go to accounts → security → on existing tokens, whenever I try to revoke any of them, they force me to reauthenticate. Also authenticated with GitHub.

We are having the same issues.

It started with our pipelines failing, and giving us a “Could not find a default branch for project with key” in SonarCloud analyze step or ##[error]System.Net.Http.HttpRequestException: Response status code does not indicate success: 403. in the SonarCloud prepare step.

Also having both issues, reported by my team.

When I try to verify the Token in Azure DevOps I get the error:
Failed to query service connection API: ‘https://sonarcloud.io/api/organizations/search?member=true’. Status Code: ‘Unauthorized’, Response from server: ‘{“errors”:[{“msg”:“Authentication is required”}]}’

We are also getting the same issue:**
Response status code does not indicate success: 403.
**
Then when we go to:
Bitbucket Pipelines → I have a pipeline → We get forced to reauthenticate.

Hey everyone.

Acknowledged. We are opening an incident. Thank you for the reports, and we will keep you updated.

3 Likes

We are experiencing the same issue, and it’s somewhat blocking our CI/CD at the moment because SonarGate is mandatory.

1 Like

Same issue, token(s) stopped to work for us

Same issue for our organisation - all scans are failing and 500 error why try to generate scoped organisation token

2 Likes

Same issue. Tried with new token as well but no luck. Seems like hotfix is on the way!