Unable to view PR/branch information in SonarCloud after analysis

I am using the Sonar scanner CLI tool for Dotnet for analysis. I see that the analysis processes successfully executes. However, I do not see a per PR/branch information in SonarCloud. Rather it is seen as a project analyze in the default (master) branch.
I am using SonarScanner Version -

FROM mcr.microsoft.com/dotnet/aspnet:5.0-focal AS base

FROM mcr.microsoft.com/dotnet/sdk:5.0-focal AS build

#Install open jdk 11 for SonarCloud analysis tool
RUN apt-get update && \
	apt-get install apt-utils -y && \
    apt-get install -y openjdk-11-jdk && \
    apt-get install -y ant && \
    apt-get clean;
RUN apt-get update && \
    apt-get install ca-certificates-java && \
    apt-get clean && \
    update-ca-certificates -f;

ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/

COPY ./ ./

# SonarCloud analysis and publish
RUN dotnet tool install --global dotnet-sonarscanner

RUN dotnet restore "/api-services/src/serviceA/serviceA.csproj"

RUN /root/.dotnet/tools/dotnet-sonarscanner begin /o:"org" /k:"key" /d:sonar.scm.provider="git" /d:sonar.login="xxxx" <other analysis parameters>

RUN dotnet build "/api-services/src/serviceA/serviceA.csproj" -c Release -o /app/build
RUN dotnet test "/api-services/tests/serviceA/serviceA.test.csproj"
RUN /root/.dotnet/tools/dotnet-sonarscanner end /d:sonar.login="xxxx"

FROM build AS publish
RUN dotnet publish "/api-services/src/serviceA/serviceA.csproj" -c Release -o /app/publish

From the logs I see the following information -

2021-03-17T07:51:19.6528725Z INFO: Load project pull requests
2021-03-17T07:51:19.6994116Z INFO: Load project pull requests (done) | time=46ms
2021-03-17T07:51:19.7112208Z INFO: Load branch configuration
2021-03-17T07:51:19.7196187Z INFO: Load branch configuration (done) | time=5ms
2021-03-17T07:51:19.7554671Z INFO: Load quality profiles
2021-03-17T07:51:19.8294839Z INFO: Load quality profiles (done) | time=74ms
2021-03-17T07:51:19.8364039Z INFO: Load active rules
2021-03-17T07:51:21.2875395Z INFO: Load active rules (done) | time=1447ms
2021-03-17T07:51:21.3065227Z INFO: Organization key: xxxxx

Please let me know if any further info is required for assistance.


The scanner requires extra parameters in order to execute builds on Pull Requests

If you are analysing a branch, you have to pass the sonar.branch.name parameter.

If you are analysing a PullRequest, depending on the CI you use, you will have at least to provide :