Administering portfolios
As a SonarQube Cloud portfolio administrator, you can grant permissions to administer, edit, create, and view portfolios, and avoid duplicate project branches in hierarchies.
This feature is only available in the Enterprise plan.
A portfolio is a set of projects within an enterprise that enables an aggregate view of its state through various lenses, including releasability, security, reliability, and maintainability.
Permissions
To create a portfolio or a portfolio permission template, you must first be granted the Create Portfolios permission by enterprise administrator. See Step 3: Set the enterprise permissions of users for details.
The permissions to administer, edit, or view a portfolio are granted by the portfolio administrator in the portfolio settings.
Administer, edit, and view permissions
The following permissions are available for a portfolio:
Administer
Can change the portfolio’s permissions.
Edit
Grants the ability to:
Delete a portfolio.
Add projects by name (with projects’ Browse permission), by project tags, by organizations, or using regex (without projects’ Browse permission).
Remove any projects. When editing the portfolio, projects without the Browse permission still appear by name in its project list and can be removed. Their project keys are not shown in the UI, but the Web API returns them. Once removed, they cannot be added back by name without the Browse permission. Seeing a project’s name or key does not grant access to the project.
View
Can view the portfolio. Projects without the Browse permission are hidden throughout the portfolio.

Go to Portfolios in the top navigation and select your enterprise.
Select the portfolio you want to add the permissions to from the Portfolios page
Go to Administration > Permissions
Assign users and groups the Administer, Edit, and View permissions or select Apply Permission Template. The Filters sidebar allows you to find users by Type, Role, and Organization.
Portfolio permission templates
Portfolio permission template defines the portfolio-related permissions granted to groups and members of your enterprise. Enterprise administrators can define several permission templates in your organization including a default template. Using permission templates allows you to:
Grant or revoke different sets of permissions to users or groups.
Set a default template for new portfolios.
Creating portfolio permission templates
The Enterprise administrator permission is required to create permission templates:
Retrieve your enterprise. See Retrieving and viewing your enterprise.
Select Administration > Portfolio Permission Templates.
Select Create new template at the top right of the page.
Enter the Template Name and Description in the modal.
Assign users and groups the Administer, Edit, and View permissions. The Filters sidebar allows you to find users by Type, Role, and Organization.
Editing portfolio permission templates
To edit an existing permission template:
Retrieve your enterprise. See Retrieving and viewing your enterprise.
Select Administration > Portfolio Permission Templates.
From your permission template’s Actions menu you can set the template as default for new portfolios, edit permissions, update name and description or delete the template.

Duplicate project branches
In a portfolio hierarchy, the same project branch can be selected in more than one portfolio. This can happen with dynamic selections, for example when a tag selection in one child portfolio and a RegEx selection in another match the same project.
Duplicates do not block the portfolio computation. Totals and metrics count each project branch once, so the aggregated results stay accurate.
As a best practice, add each project branch directly to only one portfolio in the hierarchy. This keeps the hierarchy easy to understand, with each project branch belonging to a single part of your organization.
To find and remove duplicates:
Retrieve the root portfolio. See Retrieving a portfolio.
Go to your portfolio > Administration > Portfolio definition. If the hierarchy contains duplicate project branches, the page shows a warning.
Select Manage portfolio contents.
In the Portfolio tree, select a portfolio with a warning icon. Its Add projects directly section shows how many duplicate project branches it has.
Select View locations with duplicates to see the other portfolios that select the same project branches.
Change the project selection of the affected portfolios so that only one portfolio selects each project branch. See Adding projects directly.
Select Save.
Related pages
Last updated
Was this helpful?

