Hello, we have had a PowerShell script that we have been running for a couple of years with a token that is set to not expire. A few months ago it stopped working, I have been trying to troubleshoot the issue and I am getting 401’s when trying to do project search or valid user calls.
Our script uses Invoke-Webrequest with Authorization header and the token converted to base 64. We haven’t changed the script or revoked the token.
What I have done to troubleshoot.
Created new token and verified user is with our Sonar Admin group with has administer permission to all projects. Verified with a few projects and permissions are there.
Replicated API Request on postman with old token and newly generated token. Same outcome 401.
Used the built-in admin basic username and password authentication with postman. This works.
Tried to use bearer token in postman with and without base 64 encoding, same 401.
It seems that tokens do not work and only method is Basic username and password with the built-in admin. Our users and admins use single sign on and Tokens do not seem to work anymore. We had this working for few years, I checked documentation to see of any major changes and I do not see anything that stands out.