Set different levels of pipeline permissions

Azure Pipelines | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018 - TFS 2015

Note

In Microsoft Team Foundation Server (TFS) 2018 and previous versions, build and release pipelines are called definitions, runs are called builds, service connections are called service endpoints, stages are called environments, and jobs are called phases.

Pipeline permissions are the permissions associated with pipelines in an Azure DevOps project. Permissions in Azure DevOps are hierarchical and can be set at the organization, server (for on-premises), project, and object levels.

Object-level permissions are designed to be more granular than organization-level permissions. For example, a user could have access to your Azure repository thanks to their organization-level permissions. However, that same user could be prevented from running a pipeline manually because of that pipeline's permissions.

You can increase the security of your pipeline by fine-tuning the object-level permissions associated with your pipeline. To learn more about best practices for pipeline security, see Security Azure Pipelines.

To learn more about how Azure DevOps permissions work overall, including how the permissions hierarchy, see Get started with permissions, access, and security groups.

Prerequisites

Default permissions assigned to built-in security groups

Build

Task

Readers

Contributors

Build admins

Project admins

View builds

✔️

✔️

✔️

✔️

View build pipeline

✔️

✔️

✔️

✔️

Administer build permissions

✔️

✔️

Delete or Edit build pipeline

✔️

✔️

✔️

Delete or Destroy builds

✔️

✔️

Edit build quality

✔️

✔️

✔️

Manage build qualities

✔️

✔️

Manage build queue

✔️

✔️

Override check-in validation by build

✔️

Queue builds

✔️

✔️

✔️

Retain indefinitely

✔️

✔️

✔️

✔️

Stop builds

✔️

✔️

Update build information

✔️

Release

Task

Stakeholders

Readers

Contributors

Project Admins

Release
Admins

Approve releases

✔️

✔️

✔️

✔️

View releases

✔️

✔️

✔️

✔️

✔️

View release pipeline

✔️

✔️

✔️

✔️

Administer release permissions

✔️

✔️

Delete release pipeline or release stage

✔️

✔️

✔️

Delete releases

✔️

✔️

✔️

Edit release pipeline

✔️

✔️

Edit release stage

✔️

✔️

✔️

Manage deployments

✔️

✔️

Manage release approvers

✔️

✔️

✔️

Manage releases

✔️

✔️

Task groups

Task Readers Contributors Build Admins Project Admins Release Admins
Administer task group permissions ✔️ ✔️ ✔️
Delete task group ✔️ ✔️ ✔️
Edit task group ✔️ ✔️ ✔️

Build

Task

Readers

Contributors

Build
Admins

Project Admins

View builds

✔️

✔️

✔️

✔️

View build definition

✔️

✔️

✔️

✔️

Administer build permissions

✔️

✔️

Delete or Edit build definitions

✔️

✔️

✔️

Delete or Destroy builds

✔️

✔️

Edit build quality

✔️

✔️

✔️

Manage build qualities

✔️

✔️

Manage build queue

✔️

✔️

Override check-in validation by build

✔️

Queue builds

✔️

✔️

✔️

Retain indefinitely

✔️

✔️

Stop builds

✔️

✔️

Update build information

✔️

Release

Task

Readers

Contributors

Project Admins

Release
Admins

Approve releases

✔️

✔️

✔️

View releases

✔️

✔️

✔️

✔️

View release definition

✔️

✔️

✔️

✔️

Administer release permissions

✔️

✔️

Delete release definition or release stage

✔️

✔️

✔️

Delete releases

✔️

✔️

✔️

Edit release definition

✔️

✔️

Edit release stage

✔️

✔️

✔️

Manage deployments

✔️

✔️

Manage release approvers

✔️

✔️

✔️

Manage releases

✔️

✔️

Set pipeline permissions

You can update pipeline permissions with security groups or by adding individual users. To learn how to add a user to Azure Pipelines, see Add users to Azure Pipelines.

When it comes to security, there are different best practices and levels of permissiveness.

  • In many cases, you probably also want to set Delete build pipeline to Allow. Otherwise these team members can't delete even their own build pipelines.

  • Without Delete builds permission, users cannot delete even their own completed builds. However, keep in mind that they can automatically delete old unneeded builds using retention policies.

  • We recommend that you do not grant these permissions directly to a person. A better practice is to add the person to the build administrator group or another group, and manage permissions on that group.

Update pipeline permissions at the project-level

To set the permissions at project level for all pipelines, choose Manage security from contextual menu for all pipelines.

  1. In your project, go to Pipelines > Pipelines.

    Select Pipelines from the menu.

  2. Select Manage security from More actions .

    Manage security for all pipelines in a project.

  3. Modify the permissions associated with an Azure DevOps group (example: Build Administrators) or individual user.

  4. Set permissions by selecting Allow or Deny for the permission for a security group or an individual user.

Update pipeline permissions for one pipeline

To set or override the permissions for a specific pipeline, choose Security from the context menu of the individual pipeline.

  1. In your project, go to Pipelines > Pipelines.

    Select Pipelines from the menu.

  2. Open an individual pipeline.

Manage pipeline security

Build and YAML pipeline permissions follow a hierarchical model. Defaults for all the permissions can be set at the project level and can be overridden on an individual build pipeline.

To set the permissions at project level for all pipelines in a project, choose Security from the action bar on the main page of Builds hub.

To set or override the permissions for a specific pipeline, choose Security from the context menu of the pipeline.

The following permissions are defined for pipelines. All of these can be set at both the levels.

Pipeline permissions reference

These permissions are defined for pipelines. All of these permissions can be set for both all pipelines in a project or for an individual pipeline.

To learn more about how permissions are set, including inheritance, see About permissions and inheritance. To learn how inheritance is supported for role-based membership, see About security roles

Permission Description
Administer build permissions Can change any of the other permissions listed here.
Queue builds Can queue new builds.
Delete build pipeline Can delete build pipeline(s).
Delete builds Can delete builds for a pipeline. Builds that are deleted are retained in the Deleted tab for a period of time before they are destroyed.
Destroy builds Can delete builds from the Deleted tab.
Edit build pipeline Can create pipelines and save any changes to a build pipeline, including configuration variables, triggers, repositories, and retention policy.
Edit build quality Can add tags to a build.
Override check-in validation by build Applies to TFVC gated check-in builds. This does not apply to PR builds.
Retain indefinitely Can toggle the retain indefinitely flag on a build.
Stop builds Can stop builds queued by other team members or by the system.
View build pipeline Can view build pipeline(s).
View builds Can view builds belonging to build pipeline(s).
Update build information It is recommended to leave this alone. It's intended to enable service accounts, not team members.
Manage build qualities Only applies to XAML builds
Manage build queue Only applies to XAML builds

Default values for these permissions are set for team project collections and project groups. For example, Project Collection Administrators, Project Administrators, and Build Administrators are given all of the above permissions by default.

Once you've been added as a team member, you're a member of the Contributors group. This group permission allows you to define and manage builds and releases. The most common built-in groups include Readers, Contributors, and Project Administrators.

For more information on default permissions, see Default permissions and access quick reference.

Set release permissions

Permissions for release pipelines follow a hierarchical model. Defaults for all the permissions can be set at the project level and can be overridden on an individual release pipeline.

Update pipeline permissions for all releases

To update permissions for all releases, open Releases in the Pipelines tab.

  1. Select the file view.

    Select the all files view.

  2. Select the All pipelines folder.

    Select all pipelines folder.

  3. Open More actions and select Security.

Update pipeline permissions for one release

To update permissions for one release, first open Releases in the Pipelines tab.

  1. Select the release you want to modify.

  2. Open More actions and select Security.

To set permissions at project level for all release definitions in a project, open the shortcut menu from the drop-down list

To set or override the permissions for a specific release pipeline, open the shortcut menu from the drop-down list icon next to that pipeline name. Then choose Security to open the Permissions dialog.

To specify security settings for individual stages in a release pipeline, open the Permissions dialog by choosing Security on the shortcut menu that opens from More actions on a stage in the release pipeline editor.

Release permissions reference

The following permissions are defined for releases. The scope column explains whether the permission can be set at the project, release pipeline, or stage level.

Permission Description
Administer release permissions Can change any of the other permissions listed here.
Scopes: Project, Release pipeline, Stage
Create releases Can create new releases.
Scopes: Project, Release pipeline
Delete release pipeline Can delete release pipeline(s).
Scopes: Project, Release pipeline
Delete release stage Can delete stage(s) in release pipeline(s).
Scopes: Project, Release pipeline, Stage
Delete releases Can delete releases for a pipeline.
Scopes: Project, Release pipeline
Edit release pipeline Can save any changes to a release pipeline, including configuration variables, triggers, artifacts, and retention policy as well as configuration within a stage of the release pipeline. To make changes to a specific stage in a release pipeline, the user also needs Edit release stage permission.
Scopes: Project, Release pipeline
Edit release stage Can edit stage(s) in release pipeline(s). To save the changes to the release pipeline, the user also needs Edit release pipeline permission. This permission also controls whether a user can edit the configuration inside the stage of a specific release instance. The user also needs Manage releases permission to save the modified release.
Scopes: Project, Release pipeline, Stage
Manage deployments Can initiate a deployment of a release to a stage. This permission is only for deployments that are manually initiated by selecting the Deploy or Redeploy actions in a release. If the condition on a stage is set to any type of automatic deployment, the system automatically initiates deployment without checking the permission of the user that created the release. If the condition is set to start after some stage, manually initiated deployments do not wait for those stages to be successful.
Scopes: Project, Release pipeline, Stage
Manage release approvers Can add or edit approvers for stage(s) in release pipeline(s). This permissions also controls whether a user can edit the approvers inside the stage of a specific release instance.
Scopes: Project, Release pipeline, Stage
Manage releases Can edit the configuration in releases. To edit the configuration of a specific stage in a release instance (including variables marked as settable at release time), the user also needs Edit release stage permission.
Scopes: Project, Release pipeline
View release pipeline Can view release pipeline(s).
Scopes: Project, Release pipeline
View releases Can view releases belonging to release pipeline(s).
Scopes: Project, Release pipeline

Default values for all of these permissions are set for team project collections and project groups. For example, Project Collection Administrators, Project Administrators, and Release Administrators are given all of the above permissions by default. Contributors are given all permissions except Administer release permissions. Readers, by default, are denied all permissions except View release pipeline and View releases.

Set task group permissions

You can use task groups to combine a sequence of tasks already defined in a pipeline into a single, reusable task. Task groups are defined in the Task groups tab for Azure Pipelines.

Task group permissions follow a hierarchical model. Defaults for all the permissions can be set at the project level and can be overridden on an individual task group pipeline.

Set task group permissions at the project-level

Note

Task groups are not supported in YAML pipelines. Instead, in that case you can use templates. See YAML schema reference.

  1. Open Pipelines > Task groups in your project.

    Find task group menu item.

  2. Select Security.

    Select the Security option for a task group.

  3. Set permissions by selecting Allow or Deny for the permission for a security group or an individual user.

Set task group permissions at the pipeline-level

  1. Open Pipelines > Task groups in your project.

    Find task group menu item.

  2. Select a task group.

  3. Select More actions to open the Security menu.

  4. Set permissions by selecting Allow or Deny for the permission for a security group or an individual user.

Task group permissions reference

Permission Description
Administer task group permissions Can add and remove users or groups to task group security.
Delete task group Can delete a task group.
Edit task group Can create, modify, or delete a task group.

Set agent pool permissions

You can use pre-defined roles to configure security on agent pools. You can configure this in a hierarchical manner either for all pools, or for an individual pool.

To configure agent pool permissions, open Settings . Select Security to configure security settings for all agent pools.

Configure agent pool security.

To configure permissions for one agent pool, select the agent. Then, select the Security tab.

Set security for one agent pool.

Set library permissions

Permissions for library artifacts, such as variable groups and secure files, are managed by roles. You can use a variable group to store values that you want to make available across multiple build and release pipelines. Roles are also defined to help you configure security on shared library entities such as variable groups. You can configure these roles hierarchically.

To define and manage variable groups and secure files, open the Library tab in Azure Pipelines.

Open the Library menu option.

You can configure Library object permissions for everything in your library or for an individual variable group or secure file. Select the Security option in the navigation for all of your variable groups and secure files or for one instance.

Security option in Library.

Library permissions reference

Role Description
Administrator Can edit/delete and manage security for library items.
Creator Can create library items.
Reader Can only read library items.
User Can consume library items in pipelines.

Set service connection permissions

You add users to the following roles from the project-level admin context, Services page. To create and manage these resources, see Service connections for build and release.

To configure service connection permissions, open Settings . Select Service connections in Pipelines to configure service connections.

You can configure permissions in a hierarchical manner either for all service connections, or for an individual connection.

To configure permissions for all service connections, select Security from More actions .

Select security service connection option.

To configure permissions for one service connection, open the service connection and select Security from More actions within an individual service connection.

If you're having trouble with permissions and service connections, see Troubleshoot Azure Resource Manager service connections.

Service connection permissions reference

Role Description
User Can use the endpoint when authoring build or release pipelines.
Administrator Can manage membership of all other roles for the service connection as well as use the endpoint to author build or release pipelines. The system automatically adds the user that created the service connection to the Administrator role for that pool.

Set deployment pool permissions

You can set default security roles for all deployment groups and manage security roles for an individual deployment group.

To set default deployment group permissions, open Deployment groups in the Pipelines tab. Then, select Security.

Select Security to manage default deployment group permissions.

To set permissions for a specific deployment group, select the deployment group. On the deployment group page, select Security.

Deployment pool permissions reference

Role Description
Reader Can only view deployment pools.
Service Account Can view agents, create sessions, and listen for jobs from the agent pool.
User Can view and use the deployment pool for creating deployment groups.
Administrator Can administer, manage, view and use deployment pools.

Set environment permissions

You can use roles and user permissions to control who can create, view, and manage environments. Environment roles are hierarchical and can be applied to all environments or one environment.

To change environment permissions, open Environments in the Pipelines tab.

Select Environments.

Select Security from More actions to change permissions for all environment.

To change the permission for one environment, select the environment. Then, select Security from More actions .

Environment permissions reference

Note

When you create an environment in a YAML, contributors and project administrators will be granted the administrator role. When you create an environment through the UI, only the creator will have the administrator role.

Role Description
Creator Global role, available from environments hub security option. Members of this role can create the environment in the project. Contributors are added as members by default. Required to trigger a YAML pipeline when the environment does not already exist.
Reader Members of this role can view the environment.
User Members of this role can use the environment when creating or editing YAML pipelines.
Administrator In addition to using the environment, members of this role can manage membership of all other roles for the environment. Creators are added as members by default.

FAQ

Why can't I create a new pipeline?

You need edit build pipeline permissions to create a new pipeline. To add the permission, open the security settings for all pipelines and verify that Edit build pipeline is set to Allow for your security group.

If you're still unable to create a pipeline after updating this permission, check to see if your access level is set to Stakeholder. If you have stakeholder access, change your access to Basic.

Why do I see the message that I need to authorize a resource before the run can continue?

You'll need to authorize resources before you can use them. The exception to this is that when you create a pipeline for the first time, all the resources that are referenced in the YAML file are automatically authorized. The resource are authorized for the pipeline as long as the user running the pipeline has access to the resource.

If you want to authorize all pipelines to access a resource like an agent pool, go to the permissions setting for that resource.

For example, if you want all pipelines to be able to use an agent pool, go to Settings and select Agent Pools in Pipelines.

Next, select the Security tab for a specific agent pool and update permissions to grant access to all pipelines.

Grant permissions to all pipelines.

To learn more about resources, see Resources in YAML.