Unable to contact bitbucket server: 401

Required information:
SQ version 8.9
Developer Edition

Details:
We use a Sonarqube + Bitbucket + Bamboo toolchain and are experiencing a failure at the time SonarQube attempts to inform Bitbucket about the Pull Request scan report. This is a requirement if the Code Insights option in Bitbucket is turned on to report annotations for the Pull Requests.
Work flow and error occurrence is as follow:

  1. Pull request initiated in Bitbucket (successful)
  2. Bamboo build job executes and initiates SonarQube scan (successful)
  3. SonarQube scan executes (successful)
  4. Bitbucket ‘Merge’ feature is blocked due an unknown issue between SonarQube and Bitbucket:
    - SonarQube pull request scan completes, with the following warning: Failed to create Bitbucket Server Quality Report for commit SHA ‘82c414bba6716bd2f2496ef3533ec3662fbf2bda’
    - Bitbucket does not receive confirmation of the scan, with the following warning: Report with key ‘com.sonarsouce.sonarqube’ has not yet been created
    - SonarQube ce.log file in Debug mode reports the following failure: Unable to contact Bitbucket server: 401 … Only the author of a report is permitted to edit it

Can someone chime in on this please with assistance? For clarity, the last details in the post show this is originating from SonarQube: “…SonarQube ce.log file in Debug mode reports the following failure: Unable to contact Bitbucket server: 401 … Only the author of a report is permitted to edit it..

Perhaps someone familiar with the code could determine what scenario would generate the Only the author of a report is permitted to edit it part?

We also have this issue.
It happens when the user uploading the report is a different user than the one who created the pull request.
Ex. a developer makes a pull request > triggers Sonarqube which tries to upload the report with a service account.

It worked when I made a pull request and Sonarqube used my personal account to upload, but that’s no solution.