Skip to content

AzDoPipelinePermission

github-actions[bot] edited this page Aug 19, 2026 · 4 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
ProjectName Key System.String The Azure DevOps project name.
GroupName Required System.String The name of the group whose permissions are being managed.
PipelineName Required System.String The name of the pipeline.
Ensure Write Ensure Present, Absent
isInherited Write System.Boolean Whether the permissions are inherited. Default is $true.
Permissions Write System.Collections.Hashtable[] Hashtable array of permissions to apply.
LookupResult Read System.Collections.Hashtable

Description

The AzDoPipelinePermission class manages pipeline-level permissions within an Azure DevOps project using the Build security namespace.

Examples

Example 1

This example shows how to grant permissions on a pipeline in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoPipelinePermission 'AddAzDoPipelinePermission'
        {
            Ensure       = 'Present'
            ProjectName  = 'MyProject'
            PipelineName = 'MyBuildPipeline'
            GroupName    = '[MyProject]\Contributors'
            isInherited  = $true
            Permissions  = @(
                @{ Permission = 'ViewBuilds'; Access = 'Allow' }
                @{ Permission = 'QueueBuilds'; Access = 'Allow' }
            )
        }
    }
}

Example 2

This example shows how to update pipeline permissions in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoPipelinePermission 'UpdateAzDoPipelinePermission'
        {
            Ensure       = 'Present'
            ProjectName  = 'MyProject'
            PipelineName = 'MyBuildPipeline'
            GroupName    = '[MyProject]\Contributors'
            isInherited  = $false
            Permissions  = @(
                @{ Permission = 'ViewBuilds'; Access = 'Allow' }
                @{ Permission = 'QueueBuilds'; Access = 'Allow' }
                @{ Permission = 'EditBuildDefinition'; Access = 'Deny' }
            )
        }
    }
}

Example 3

This example shows how to remove pipeline permissions in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoPipelinePermission 'RemoveAzDoPipelinePermission'
        {
            Ensure       = 'Absent'
            ProjectName  = 'MyProject'
            PipelineName = 'MyBuildPipeline'
            GroupName    = '[MyProject]\Contributors'
        }
    }
}

Commands

Resources

Clone this wiki locally