Configure pipeline permissions in Azure Pipelines

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

This article explains how to secure your build pipelines by setting user and group permissions to control access to specific functions and tasks.

Pipeline security follows a hierarchical model of user and group permissions. Project-level permissions are inherited at the object level by all pipelines in the project. You can change inherited and default user and group permissions for all pipelines at the project- and object-levels. You can't change permissions set by the system.

The default security groups for pipelines are:

Group Description
Build Administrators Administer build permissions and manage pipelines and builds.
Contributors Manage pipelines and builds, but not build queues. This group includes all team members.
Project Administrators Administer build permissions and manage pipelines and builds.
Readers View pipeline and builds.
Project Collection Administrators Administer build permissions and manage pipelines and builds.
Project Collection Build Administrators Administer build permissions and manage pipelines and builds.
Project Collection Build Service Accounts Manage builds.
Project Collection Test Service Accounts View pipelines and builds.

The system automatically creates the <project name> Build Service (collection name) user, a member of the Project Collection Build Service Accounts group. This user executes build services within the project.

Depending on the resources you use in your pipelines, your pipeline could include other built-in users. For instance, if you're using a GitHub repository for your source code, a GitHub user is included.

The default permissions for security groups are:

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 ✔️

For a description of pipeline permissions, see Pipeline or Build permissions.

Prerequisites

  • You must be a member of the Project Collection Administrators group to manage project collection groups.
  • You must be a member of an administrator group or be allowed Administer build permissions to manage project level users and groups.

Set project-level pipeline permissions

Follow these steps to configure project-level permissions for users and groups across all build pipelines in your project:

  1. From your project, select Pipelines.

    Screenshot showing Pipelines menu selection.

  2. Select More actions and select Manage security.

    Screenshot showing pipelines security selection.

  3. Select users or groups and set permissions to Allow, Deny, or Not set.

    Screenshot of project-level pipelines security dialog.

  4. Repeat the previous step to change the permissions for more groups and users.

  5. Close permissions dialog to save the changes.

Add users or groups to the permissions dialog

To add users and groups that aren't listed in the permissions dialog:

  1. Enter the user or group in the search bar, then select the user or group from the search result.
  2. Set the permissions.
  3. Close the dialog.

When you open the security dialog again, the user or group is listed.

Remove users or groups from the permissions dialog

To delete a user from the permissions list:

  1. Select the user or group.

  2. Select Remove and clear explicit permissions.

    Screenshot of remove user or group selection.

  3. When finished, close the dialog to save your changes.

Follow these steps to configure project-level permissions for users and groups across all build pipelines in your project:

  1. From your project, select Pipelines.

    Screenshot showing Pipelines menu selections.

  2. Select More actions and select Manage security.

    Screenshot showing security selection for all pipelines in a project.

  3. To add users or groups that aren't listed in the permissions dialog, select Add, enter the user or group, and select Save changes.

  4. Select a user or group and set the permissions.

    Screenshot showing project-level pipeline security dialog.

  5. Repeat the previous step to change the permissions for more groups and users.

  6. Select Save changes or you can select Undo changes to undo the changes.

  7. To remove a user or group from the list, select the user or group and select Remove.

  8. Select Close.

Your project-level pipelines permissions are set.

Follow these steps to configure project-level permissions for users and groups across all build pipelines in your project:

  1. Go to your project, select the Builds from the menu.

  2. Select the folders icon and select the All build pipelines folder.

  3. Select More actions > Security.

    Screenshot showing all pipelines security selections.

  4. To add users or groups that aren't listed in the permissions dialog, select Add, enter the user or group, and select Save changes.

    Screenshot of pipeline security add user or group selection.

  5. Select a user or group and set the permissions.

    Screenshot of pipeline security dialog.

  6. Select Save changes or you can select Undo changes to undo the changes.

  7. Repeat the previous step to change the permissions for more groups and users.

  8. To remove a user or group from the list, select the user or group and select Remove.

  9. Select Close.

Set object-level pipeline permissions

By default, object-level permissions for individual pipelines inherit the project-level permissions. You can override the inherited project-level permissions.

You can set the permissions to Allow, Deny, or to Not set if the permission is not inherited. If inheritance is enabled you can change an explicitly set permission back to the inherited value.

Complete the following steps to configure permissions for a pipeline.

  1. From within your project, select Pipelines .

    Screenshot showing Pipelines menu selection.

  2. Select a pipeline, then select More actions and select Manage security.

    Screenshot showing selected security option from a pipeline's more actions menu.

  3. Select a user or group and set the permissions.

    Screenshot of object-level pipeline security dialog.

  4. Repeat the previous step to change the permissions for more groups and users.

  5. When you're finished, close the dialog to save your changes.

Add users or groups to the permissions dialog

To add users and groups that aren't listed in the permissions dialog:

  1. Enter the user or group in the search bar, then select the user or group from the search result.
  2. Set the permissions.
  3. Close the dialog.

When you open the security dialog again, the user or group is listed.

Remove users or groups from the permissions dialog

Users and groups can be removed from the pipeline's permissions. Inherited users and groups can't be removed unless inheritance is disabled.

  1. Select the user or group.

  2. Select Remove and clear explicit permissions.

    Screenshot of remove user or group selection.

  3. When finished, close the dialog to save your changes.

By default, object-level permissions for individual pipelines inherit the project-level permissions. You can override the inherited permissions.

You can set the permissions to Allow, Deny, or to Not set if the permission is not inherited. If inheritance is enabled you can change an explicitly set permission back to the inherited value.

Follow these steps to set permissions for an individual pipeline:

  1. From within your project, select Pipelines .

    Screenshot showing Pipelines ordered menu selections.

  2. Select a pipeline, then select More actions and select Manage security.

    Screenshot showing selected Manage security option from a pipeline's more actions menu.

  3. To add users or groups that aren't listed in the permissions dialog, select Add, enter the user or group, and select Save changes.

  4. Select users and groups and set the permissions.

  5. Select Save changes or you can select Undo changes to undo the changes.

    Screenshot of pipeline security add user or group selection.

  6. To remove a user or group, select the user or group and select Remove. Inherited users and groups can't be removed unless inheritance is disabled.

  7. Select Close when you're finished.

When you explicitly set an inherited user or group permission, inheritance is disabled for that specific permission. To restore inheritance, set the permission to Not set. Select Clear explicit permissions to reset all explicitly set permissions to their inherited settings. To disable inheritance for all user and group permissions, turn off the Inheritance setting. Upon re-enabling inheritance, the permissions for all users and groups revert to their project-level settings.

Object-level permissions for individual pipelines inherit the project-level permissions by default. You can override these inherited permissions for an individual pipeline.

You can set the permissions to Allow, Deny, or to Not set if the permission is not inherited. If inheritance is enabled you can change an explicitly set permission back to the inherited value.

Follow these steps to set object-level permissions for a pipeline:

  1. Go to your project, select the Builds from the menu.

  2. Select the folders icon and select the All build pipelines folder.

  3. Select More actions > Security.

    Screenshot showing all pipelines security navigation selections.

  4. To add users or groups that aren't listed in the permissions dialog, select Add, enter the user or group, and select Save changes.

    Screenshot of pipeline security add user or group.

  5. Select a user or group and set the permissions.

  6. You can select more users and groups to change their permissions.

  7. Select Save changes or you can select Undo changes to undo the changes.

  8. To remove a user or group, select the user or group and select Remove. Inherited users and groups can't be removed unless inheritance is disabled.

  9. Select Close when you're finished.

When you explicitly set an inherited user or group permission, inheritance is disabled for that specific permission. To restore inheritance, set the permission to Not set. Select Clear explicit permissions to reset all explicitly set permissions to their inherited settings. To disable inheritance for all user and group permissions, turn off the Inheritance setting. Upon re-enabling inheritance, the permissions for all users and groups revert to their project-level settings.