Lesson 5 of 7 Authentication and Access

Designing Permissions and Security Groups in Azure DevOps

This lesson explains default groups, permission resolution and pipeline resource security.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the default security groups.
  • Explain how permissions resolve.
  • Identify object-level security settings.
  • Explain separation of duties.

Default security groups

Azure DevOps creates groups at two levels. Organization-level groups include Project Collection Administrators, who can do almost anything across an organization, Project Collection Service Accounts and Project Collection Valid Users. Project-level groups are created with each project.

GroupPurpose
Project AdministratorsManage a project, including permissions and settings
Build AdministratorsManage build resources and permissions
ContributorsAdd, change and delete code and work items
ReadersView project content
Project Valid UsersAll members of the project, used for assigning common permissions
Release AdministratorsManage release pipelines, if created

A new team also receives a group, named after the team, and it is a member of Contributors by default. Custom groups can be added. Microsoft Entra groups can be added to any of these groups, so that access follows joiner and leaver processes in Microsoft Entra ID, and this is usually the best approach.

Scenario questions

Default groups in Azure DevOps

Exam skills 4.1.5

Choose the default group or approach for each need.

Log in to try this activity Interactive activities are free with an account.

How permissions are resolved

Each permission has a state, and the effective result depends on the rules below. Users usually belong to several groups, which is why resolving them matters.

  1. Explicit Deny

    A Deny on a user or any of their groups wins over Allow, with few exceptions.

  2. Explicit Allow

    If nothing denies it, an Allow from any group grants the permission.

  3. Inherited values

    An object takes permissions from its parent, if inheritance is on.

  4. Not set

    With no Allow, access is implicitly denied.

Project Collection Administrators are an exception, because they have permissions that cannot be denied in practice. The security page of an object shows the effective value, and Why traces how it was reached.

The following diagram resolves a user's Contribute permission when one group allows it and another denies it.

Why the user cannot push, and why an explicit Allow would not help. The Contributors group allows Contribute and the custom Auditors group denies it; a Deny from a group takes precedence over an Allow. The fix is to remove the user from Auditors, or to remove the group's Deny if no auditor should be blocked.
The scenario is illustrative.
Put in order

Resolving a permission

Exam skills 4.1.5

Arrange the rules in the order that decides a user's effective permission.

Log in to try this activity Interactive activities are free with an account.

Object-level security

Most project resources have their own security page, and inheritance lets a team set defaults and tighten them on sensitive objects. The following resources matter most in a delivery design.

  • Repositories and branches: Contribute, Force push and Bypass policies.
  • Pipelines: who may queue, edit, delete and retain runs. Permissions can be set for all pipelines, or within a pipeline folder.
  • Environments: Creator, Reader, User and Administrator roles.
  • Service connections: User and Administrator roles, with pipeline permissions.
  • Agent pools: Reader, Service Account and Administrator, at organization and project level.
  • Variable groups and secure files: Reader, User and Administrator, with pipeline permissions.
  • Area paths: who can view or edit work items in a path.

Two separate questions apply to a pipeline resource. Users need a role on the resource to manage it. A pipeline needs permission to use it. A pipeline author with no rights on a service connection cannot authorize a pipeline to use it.

Match the pairs

Roles on pipeline resources

Exam skills 4.1.5

Match each Azure DevOps resource with its security roles.

Log in to try this activity Interactive activities are free with an account.

Separation of duties

A classic control is that the person who writes code should not alone be able to deploy it to production. Azure DevOps can support this: pipeline authors are Contributors, with no administrator rights on the production environment, and a separate group approves through the environment's Approvals check, with the option preventing someone from approving their own run. Auditing is available under Organization settings > Auditing, and it can be streamed to Azure Monitor Logs. Events are retained for 90 days by default.

True or false

Separating authoring from deployment

Exam skills 4.1.5

Check how Azure DevOps supports separation of duties.

Log in to try this activity Interactive activities are free with an account.
Worked example

Tracing a denied user

A user belongs to Contributors, which allows Contribute on a repository, and to a custom Auditors group, which denies Contribute. The user cannot push. Should you add an explicit Allow for the user?

An Allow would not work, since a Deny from a group takes precedence over an Allow. If the user should be able to push, the correct action is to remove them from the Auditors group, or to remove the Deny from the group, if no auditor should be blocked. Adding them to Project Administrators would give far more access than needed, and it may still not override the Deny.

Check yourself

A pipeline author has Contributor rights. Can they authorize a pipeline for a service connection that they have no role on?

Show answer

No. Authorizing needs a role on the resource, separate from pipeline authoring rights.

Exam Tips

Remember for the exam

  • Project Collection Administrators have organization-wide control.
  • Deny beats Allow, and Not set is effectively denied.
  • Add Microsoft Entra groups to Azure DevOps groups.
  • Pipeline resources need a user role and pipeline permission.
  • Audit events are kept for 90 days unless streamed elsewhere.