Error while creating Scoped Organization Tokens

Hi ,

When i am trying to create “Scoped Organization Tokens” by following the procedures given in following URL Managing Scoped Organization Tokens | Sonar Documentation , I am getting the error “Internal Server Error“.

Attached the screenshot here.

Kindly help me to resolve the issue.

1 Like

Hey there.

Just tried this on our end and it seems to work. We had an incident earlier – can you give it another try?

@Colin : We are still experiencing this issue.

One important detail is that I am attempting this process with approximately 150 repositories.

When I close the window and return to the main screen, I see that the token is actually created. However, since I do not receive the token, we are unable to proceed.

When I tried the same process with just 1 or 2 repositories, it worked as expected. Ideally, I would like to generate the same token for all 150 repositories to avoid additional administrative overhead. Kindly help

1 Like

I am encountering an issue when trying to create a new Organization Scoped Token in our SonarCloud organization

  • When I create a token scoped to a single project, the token is created successfully.

  • However, when I try to create a token with a project scope including ~70 projects (and setting expiration to 1 year), I consistently get an “Internal server error” (HTTP 500).

This strongly suggests there is an internal limitation on either the number of projects allowed in a single token scope or the payload length of the request. The UI/API does not provide a validation error, only a generic 500.

Steps to Reproduce:

  1. Navigate to Organization Settings → Security → Tokens.

  2. Click Generate Token.

  3. Set scope = Execute Analysis.

  4. Add a large number of projects (around 71).

  5. Set expiration to 1 year (Any expiration period).

  6. Click Generate → receive “Internal server error”.


Expected Behavior:

  • Either the token should be created successfully with all selected projects, or

  • A clear validation message should be displayed (e.g. “Max 50 projects per token”).

@Colin : We are still facing issue. Do you know any workaround by which it can be resolved ?

Hey @BansalGaurav

The bug is being investigated and we will work towards fixing it. I don’t have an ETA to share.

@BansalGaurav,

We have pushed a fix for the issue you noticed. Can you give it another try now?

It appears to be functioning correctly now. I have successfully created a token with a project scope that includes all 71 projects. Thank you for your assistance.

3 Likes