Hello SonarCloud Support Team,
I am the owner of an organization on SonarCloud, but I mistakenly removed my own permissions from one of the projects within the organization. As a result, I no longer have access to that project and cannot manage or modify it in any way.
Since I am still the organization owner, I was expecting to be able to recover access through the organization settings, but I can’t find a way to reassign permissions to myself for that specific project.
Could you please help me restore my access to the project, or advise on how I can regain administrative rights over it?
Thank you very much in advance for your help.
Best regards,
Laurent Bartet
Colin
(Colin)
May 23, 2025, 4:21pm
2
Hey there.
If you’re using the Free/Team plan, take a look at this post.
Hey there.
In SonarCloud, you must be granted project-level permissions to view a project, regardless of your organization-level permissions.
What you’re describing sounds like what happens when the permission template that gets applied to these new projects doesn’t grant the project creator permissions on the project, either through a group the project creator belongs to or the special Creators option in the permission template setup.
[image]
So, your first stop should be validating and fi…
If you’re using the Enterprise Plan, you can follow these docs .
Thank you Colin for your response !
Hello Colin,
I’m using the team plan and when I use the api https://sonarcloud.io/api/permissions/add_user , I have the 404 error …
Colin
(Colin)
May 28, 2025, 9:28pm
5
Hey @Laurent_Bartet
This might sound unhelpful… but you’re sure that you’re replacing PROJECT_KEY
and ORG_KEY
from these commands are using the right values?
curl --header 'Authorization: Bearer MY_TOKEN' -X POST 'https://sonarcloud.io/api/permissions/add_user?projectKey=PROJECT_KEY&login=LOGIN&permission=admin&organization=ORG_KEY'
curl --header 'Authorization: Bearer MY_TOKEN' -X POST 'https://sonarcloud.io/api/permissions/add_user?projectKey=PROJECT_KEY&login=LOGIN&permission=user&organization=ORG_KEY'
The only situation where this API should return a 404 on a project in an org your account is an owner of is if these two values are not correct.
It’s worth double checking, especially if you belong to multiple orgs.
Hi Colin,
Thank you for your response.
I didn’t access to the project anymore so I don’t know the project key. I have only the name of the project: Wagram-One
Colin
(Colin)
June 6, 2025, 2:51pm
7
Hey @Laurent_Bartet
I’m still following up on this in the background. Thanks for your patience.
Hi colin,
Now I use the good project key but I have the 401 error…
Colin
(Colin)
June 19, 2025, 2:15pm
9
Hey @Laurent_Bartet
So sorry for the delayed response
A 401 usually indicates missing authentication. Have you included a token?
Yes I included a token, here the complete request (the token is not the good):
POST https://sonarcloud.io/api/permissions/add_user?projectKey=dynamesit_Wagram-ONE&login=laurent-bartet75054&permission=admin&organization=dynamesit
401
57 ms
Network
Request Headers
Authorization: Bearer 5gBcOPYbaxf5kXYZLsnHzvQBK2M82EhvK8cO41Mt1d8PBLqvQY7xJQQJ99BDACAAAAALkiujAAASAZDO38T6
User-Agent: PostmanRuntime/7.44.0
Accept: /
Postman-Token: 7828fd89-4647-4fb0-a36d-5619a7e16d6e
Host: sonarcloud.io
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 0
Response Headers
Content-Length: 0
Connection: keep-alive
Date: Mon, 23 Jun 2025 07:23:59 GMT
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Security-Policy-Report-Only: default-src ‘self’;script-src ‘self’ ‘unsafe-inline’ ‘unsafe-eval’ https://www.google-analytics.com https://www.googletagmanager.com https://tagmanager.google.com https://static.cdn.prismic.io https://bitbucket.org/atlassian-connect/all.js https://dev.azure.com js.braintreegateway.com assets.braintreegateway.com www.paypalobjects.com c.paypal.com https://static.userback.io ;style-src ‘self’ ‘unsafe-inline’ https://tagmanager.google.com https://fonts.googleapis.com https://static.cdn.prismic.io https://static.userback.io ;img-src ‘self’ https: assets.braintreegateway.com checkout.paypal.com data:;connect-src ‘self’ https://sonarcloud.io .sc-dev.io https:// .google-analytics.com https://static.cdn.prismic.io https://.sentry.io https:// .ingest.sentry.io https://sonarsource.cdn.prismic.io https://static.sonarcloud.io wss://notifications.sonarcloud.io https://d301sr5gafysq2.cloudfront.net api.sandbox.braintreegateway.com api.braintreegateway.com client-analytics.sandbox.braintreegateway.com client-analytics.braintreegateway.com *.braintree-api.com https://api.userback.io https://secure.gravatar.com https://api.bitbucket.org ;object-src ‘none’;media-src ‘none’;child-src ‘self’ assets.braintreegateway.com c.paypal.com ;frame-src ‘self’ assets.braintreegateway.com c.paypal.com .cardinalcommerce.com https://eu.3ds.acssecure.com https:// .americanexpress.com https://acs.capitalone.com ;font-src ‘self’ https://fonts.gstatic.com https://static.userback.io/fonts ;
X-Cache: Error from cloudfront
Via: 1.1 2e0227ef3f0af98f7b4e1f8452f59f84.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: AMS54-C1
X-Amz-Cf-Id: OwuNw26a3C3aybXDCaGoxWVCfaO2mOdQxGU8mkoyBATYECcWUY1adQ==
Referrer-Policy: strict-origin-when-cross-origin
Vary: Origin