SonarQube error: You're not authorized to run analysis, despite passing the token with build cmd

I tried following this comment but even after sending sonarqube token along with the mvn build command as suggested by the comment I am still getting the error.