Skip to content

AzDoProjectPermission

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

Parameters

Parameter Attribute DataType Description Allowed Values
ProjectName Key System.String
GroupName Required System.String
Ensure Write Ensure Present, Absent
isInherited Write System.Boolean
Permissions Write System.Collections.Hashtable[]
LookupResult Read System.Collections.Hashtable

Description

Examples

Example 1

This example shows how to grant project-level permissions to a group in Azure DevOps.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoProjectPermission 'AddAzDoProjectPermission'
        {
            Ensure      = 'Present'
            ProjectName = 'MyProject'
            GroupName   = '[MyProject]\Contributors'
            isInherited = $true
            Permissions = @(
                @{ Permission = 'GENERIC_READ'; Access = 'Allow' }
                @{ Permission = 'GENERIC_WRITE'; Access = 'Allow' }
            )
        }
    }
}

Example 2

This example shows how to update project-level permissions for a group in Azure DevOps.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoProjectPermission 'UpdateAzDoProjectPermission'
        {
            Ensure      = 'Present'
            ProjectName = 'MyProject'
            GroupName   = '[MyProject]\Contributors'
            isInherited = $false
            Permissions = @(
                @{ Permission = 'GENERIC_READ'; Access = 'Allow' }
                @{ Permission = 'GENERIC_WRITE'; Access = 'Allow' }
                @{ Permission = 'DELETE'; Access = 'Deny' }
            )
        }
    }
}

Example 3

This example shows how to remove project-level permissions from a group in Azure DevOps.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoProjectPermission 'RemoveAzDoProjectPermission'
        {
            Ensure      = 'Absent'
            ProjectName = 'MyProject'
            GroupName   = '[MyProject]\Contributors'
        }
    }
}

Commands

Resources

Clone this wiki locally