classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 3762504530

Facing error in Prepare Analysis Task in Azure Devops Pipeline.

Sharing logs also:

2024-03-14T11:10:20.7513827Z ##[section]Starting: Prepare analysis on SonarQube
2024-03-14T11:10:20.7600347Z ==============================================================================
2024-03-14T11:10:20.7600476Z Task         : Prepare Analysis Configuration
2024-03-14T11:10:20.7600544Z Description  : Prepare SonarQube analysis configuration
2024-03-14T11:10:20.7600621Z Version      : 5.19.1
2024-03-14T11:10:20.7600671Z Author       : sonarsource
2024-03-14T11:10:20.7600733Z Help         : Version: 5.19.1. [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2024-03-14T11:10:20.7600848Z ==============================================================================
2024-03-14T11:10:24.6766993Z [command]E:\FroschDotNetAgent\vsts-agent-win-x64-3.220.5\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.19.1\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k: demo:master
2024-03-14T11:10:24.7412104Z SonarScanner for MSBuild 5.15
2024-03-14T11:10:24.7414220Z Using the .NET Framework version of the Scanner for MSBuild
2024-03-14T11:10:24.7796085Z Pre-processing started.
2024-03-14T11:10:24.7817422Z Preparing working directories...
2024-03-14T11:10:24.8126449Z 16:40:24.797  Updating build integration targets...
2024-03-14T11:10:24.8853518Z 16:40:24.875  Fetching analysis configuration settings...
2024-03-14T11:10:24.9153010Z 16:40:24.906  16:40:24.906  WARNING: To analyze private projects make sure the scanner user has 'Browse' permission.
2024-03-14T11:10:25.0002751Z 
2024-03-14T11:10:25.0003165Z ##[error]Unhandled Exception:
2024-03-14T11:10:25.0746047Z ##[error]System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 ().
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.<TryDownloadIfExists>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.<DownloadComponentProperties>d__19.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.SonarQubeWebServer.<DownloadComponentProperties>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.PreProcessor.WebServer.SonarWebServer.<DownloadProperties>d__18.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.<FetchArgumentsAndRuleSets>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.<DoExecute>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.<Execute>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.<PreProcess>d__10.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.<Execute>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.<Execute>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.<Execute>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.<Main>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.<Main>(String[] args)
2024-03-14T11:10:25.0751213Z System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 ().
2024-03-14T11:10:25.0751415Z    at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
2024-03-14T11:10:25.0751612Z    at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.<TryDownloadIfExists>d__5.MoveNext()
2024-03-14T11:10:25.0751810Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0751989Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0752180Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0752404Z    at SonarScanner.MSBuild.PreProcessor.WebServer.SonarWebServer.<DownloadComponentProperties>d__19.MoveNext()
2024-03-14T11:10:25.0752606Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0752777Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0752972Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0753194Z    at SonarScanner.MSBuild.PreProcessor.WebServer.SonarQubeWebServer.<DownloadComponentProperties>d__3.MoveNext()
2024-03-14T11:10:25.0753399Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0753574Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0753769Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0753980Z    at SonarScanner.MSBuild.PreProcessor.WebServer.SonarWebServer.<DownloadProperties>d__18.MoveNext()
2024-03-14T11:10:25.0754176Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0754349Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0754537Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0754745Z    at SonarScanner.MSBuild.PreProcessor.PreProcessor.<FetchArgumentsAndRuleSets>d__9.MoveNext()
2024-03-14T11:10:25.0754936Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0755753Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0755951Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0756150Z    at SonarScanner.MSBuild.PreProcessor.PreProcessor.<DoExecute>d__7.MoveNext()
2024-03-14T11:10:25.0756325Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0756499Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0756692Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0756884Z    at SonarScanner.MSBuild.PreProcessor.PreProcessor.<Execute>d__6.MoveNext()
2024-03-14T11:10:25.0757061Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0757233Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0757426Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0757622Z    at SonarScanner.MSBuild.BootstrapperClass.<PreProcess>d__10.MoveNext()
2024-03-14T11:10:25.0757798Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0757966Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0758157Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0758348Z    at SonarScanner.MSBuild.BootstrapperClass.<Execute>d__8.MoveNext()
2024-03-14T11:10:25.0758516Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0758690Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0758881Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0759067Z    at SonarScanner.MSBuild.Program.<Execute>d__4.MoveNext()
2024-03-14T11:10:25.0759235Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0759408Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0759595Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0759779Z    at SonarScanner.MSBuild.Program.<Execute>d__3.MoveNext()
2024-03-14T11:10:25.0759947Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0760115Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0760307Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0760491Z    at SonarScanner.MSBuild.Program.<Main>d__2.MoveNext()
2024-03-14T11:10:25.0760652Z --- End of stack trace from previous location where exception was thrown ---
2024-03-14T11:10:25.0760829Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-03-14T11:10:25.0761020Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-03-14T11:10:25.0761194Z    at SonarScanner.MSBuild.Program.<Main>(String[] args)
2024-03-14T11:10:25.1962651Z ##[error]The process 'E:\FroschDotNetAgent\vsts-agent-win-x64-3.220.5\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.19.1\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 3762504530
2024-03-14T11:10:25.2042697Z ##[section]Finishing: Prepare analysis on SonarQube

Hi,

A 403 means ‘forbidden’. Did you pass a sonar.token in/with the analysis? And if so, are you sure the user has Browse and Analyze rights to the project?

 
Ann