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.
So, your first stop should be validating and fixing the permission template.
Now – about the projects you’ve already created. If nobody else in your organization has access to these projects, to restore access, an organization admin can use the Web API POST api/permissions/add_user
to restore access the project.
Some documentation on how to use the Web API can be found here.
What this looks like is an API call like:
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'
Replacing MY_TOKEN
, PROJECT_KEY
, LOGIN
, and ORG_KEY
with the right values. Your login will be found under My Account
POST api/projects/delete is another option if you just want to recreate the projects after fixing the permission template.
This is all too complicated in my opinion, but right now we lack a better solution for Team Plan org admins to restore access to projects they have no access to (Enterprise Plan users have access to a global project management page)