Aracılığıyla paylaş


Set pipeline permissions

TFS 2018

Note

Microsoft Visual Studio Team Foundation Server 2018 and earlier versions have the following differences in naming:

  • Pipelines for build and release are called definitions
  • Runs are called builds
  • Service connections are called service endpoints
  • Stages are called environments
  • Jobs are called phases

Pipeline permissions and roles help you securely manage your pipelines. You can set hierarchical permissions at the organization, server, project, and object levels for all pipelines in a project or for an individual pipeline. You can update pipeline permissions with security groups or by adding individual users.

Object-level permissions are more granular than organization-level permissions, so you can increase the security of your pipeline. For example, a user could have access to your Azure Repos repository thanks to their organization-level permissions. However, that same user could be prevented from running a pipeline manually because of that object/pipeline's permissions.

In this article, we break down the permissions to the following levels of permissions:

For more information, see Get started with permissions, access, and security groups, Securing Azure Pipelines, and Verify permissions for contributors.

For information about setting permissions with Azure CLI, see the Azure CLI reference.

Prerequisites

  • To manage permissions and add users to Azure Pipelines for project-level groups, you must be a Project Administrator. For more information, see Project-level group permissions.
  • To manage permissions for collection groups, you must be a Project Collection Administrator. For more information, see collection-level group permissions.
  • Keep the following information in mind when you're setting pipeline permissions.
    • In many cases, you might want to set Delete build pipeline to Allow. Otherwise, these team members can't delete their own build pipelines.
    • Without the Delete builds permission, users can't delete their own completed builds. However, they can automatically delete old unneeded builds with retention policies.
    • We recommend that you don't grant permissions directly to a user. A better practice is to add the user to the build administrator group or another group, and manage permissions for that group.

For more information and best practices, see Securing Azure Pipelines.

Default permissions assigned to built-in security groups

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 project-level pipeline permissions

Build and YAML pipeline permissions follow a hierarchical model. You can set defaults for all permissions at the project-level and override permissions for 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.

Set individual pipeline permissions

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

Pipeline permissions reference

You can set the following permissions for all pipelines in a project or for an individual pipeline. Default values are set for project collections and project groups. For example, Project Collection Administrators, Project Administrators, and Build Administrators have all these permissions by default.

Permission Description
Administer build permissions Can change any of the other permissions listed here.
Delete build pipeline Can delete build pipeline(s).
Delete builds Can delete builds for a pipeline. Deleted builds are retained in the Deleted tab for a period before they're 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.
Manage build qualities Only applies to XAML builds
Manage build queue Only applies to XAML builds
Override check-in validation by build Applies to TFVC gated check-in builds. Doesn't apply to pull request builds.
Queue builds Can queue new 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.
Update build information It is recommended to leave this alone. It's intended to enable service accounts, not team members.
View build pipeline Can view build pipeline(s).
View builds Can view builds belonging to build pipeline(s).

All team members are members 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, see the following articles:

Set release permissions

Permissions for release pipelines follow a hierarchical model. You can set default permissions at the project-level, and you can override these permissions on an individual release pipeline.

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 table defines permissions 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 update 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 permission 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 permissions are set for team project collections and project groups. For example, Project Collection Administrators, Project Administrators, and Release Administrators are given all the previously listed permissions by default. Contributors are given all permissions except Administer release permissions. By default, Readers are denied all permissions except View release pipeline and View releases.

Set task group permissions

Use task groups to combine a sequence of tasks already defined in a pipeline into a single, reusable task.

Task group permissions follow a hierarchical model. You can set default permissions at the project-level, and you can override these permissions on an individual task group pipeline.

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 predefined roles to configure security on agent pools in a hierarchical manner for all pools, or for an individual pool. Do the following steps to set agent pool permissions for all pools.

Set library permissions

Use a variable group to store values that you want to make available across multiple build and release pipelines. Define roles to help you configure security on shared library entities. You can also configure the inheritance of roles.

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

Configure permissions for all service connections or for an individual connection.

Add users to the following roles from the project-level admin context, Services page. For more information about how to create and manage these resources, see Service connections for build and release. 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.

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.

FAQs

See the following frequently asked questions (FAQs) about pipeline permissions.

Q: Why can't I create a new pipeline?

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

If you still can't create a pipeline, check to see if your access level is set to Stakeholder. If you have stakeholder access, change your access to Basic.