Skip to content

AzDoEnvironmentPermission

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

Parameters

Parameter Attribute DataType Description Allowed Values
ProjectName Key System.String
EnvironmentName Required 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 permissions on a pipeline environment in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoEnvironmentPermission 'AddAzDoEnvironmentPermission'
        {
            Ensure          = 'Present'
            ProjectName     = 'MyProject'
            EnvironmentName = 'Production'
            GroupName       = '[MyProject]\Contributors'
            isInherited     = $true
            Permissions     = @(
                @{ Permission = 'View'; Access = 'Allow' }
            )
        }
    }
}

Example 2

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

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoEnvironmentPermission 'UpdateAzDoEnvironmentPermission'
        {
            Ensure          = 'Present'
            ProjectName     = 'MyProject'
            EnvironmentName = 'Production'
            GroupName       = '[MyProject]\Contributors'
            isInherited     = $false
            Permissions     = @(
                @{ Permission = 'View'; Access = 'Allow' }
                @{ Permission = 'Manage'; Access = 'Deny' }
            )
        }
    }
}

Example 3

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

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoEnvironmentPermission 'RemoveAzDoEnvironmentPermission'
        {
            Ensure          = 'Absent'
            ProjectName     = 'MyProject'
            EnvironmentName = 'Production'
            GroupName       = '[MyProject]\Contributors'
        }
    }
}

Commands

Resources

Clone this wiki locally