Project Not Found After Long Inactivity – Is Token Expired?

Hello team,

I have a question regarding token expiration.
How long does it take for a token to expire?

The last time I ran the analysis was in October 2024. When I tried to run it again in July 2025 after a long break, I got a message saying the project could not be found.

  • ALM used (Azure DevOps)
  • Error observed

ERROR: Error during SonarScanner execution

##[error]ERROR: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator to check the permissions of the user the token belongs to

ERROR: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator to check the permissions of the user the token belongs to

##[error]ERROR:

ERROR:

##[error]ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.```

Hey there

Take a look at this thread:

Thanks Colin
I understand that if I don’t continue to apply the analysis within 60 days, it will expire.
It is a user token, but is the project token the same?
Is there any way to avoid this?

Hi,

Are you analyzing on SonarQube Cloud or are you using an on-prem solution? Because SonarQube Cloud doesn’t have project tokens.

 
Ann

Hi

I use the Cloud version.
It is a token that is generated when a project is created.
It is used to create ServiceConnections in AzureDevOps.
It is something that appears only once, does that mean it is not a project token?
I don’t know the official name.

Hi,

SonarQube Cloud only issues one type of token.

Are you generating the token in/from ADO or SonarQube Cloud?

 
Ann

Hi,

We are generating the token in SonarQube Cloud.

Hi,

Okay, going back to this:

In SonarQube Cloud there is only one type of token: user tokens. All tokens that haven’t been used in 60 days will automatically be removed.

Run analysis regularly, which is best-practice anyway.

 
HTH,
Ann

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.