Skip to content

AzDoServiceConnectionPermission

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

Parameters

Parameter Attribute DataType Description Allowed Values
ProjectName Key System.String
ConnectionName 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 service connection in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoServiceConnectionPermission 'AddAzDoServiceConnectionPermission'
        {
            Ensure         = 'Present'
            ProjectName    = 'MyProject'
            ConnectionName = 'MyAzureServiceConnection'
            GroupName      = '[MyProject]\Contributors'
            isInherited    = $true
            Permissions    = @(
                @{ Permission = 'Use'; Access = 'Allow' }
            )
        }
    }
}

Example 2

This example shows how to update permissions on a service connection in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoServiceConnectionPermission 'UpdateAzDoServiceConnectionPermission'
        {
            Ensure         = 'Present'
            ProjectName    = 'MyProject'
            ConnectionName = 'MyAzureServiceConnection'
            GroupName      = '[MyProject]\Contributors'
            isInherited    = $false
            Permissions    = @(
                @{ Permission = 'Use'; Access = 'Allow' }
                @{ Permission = 'Administer'; Access = 'Deny' }
            )
        }
    }
}

Example 3

This example shows how to remove permissions on a service connection in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoServiceConnectionPermission 'RemoveAzDoServiceConnectionPermission'
        {
            Ensure         = 'Absent'
            ProjectName    = 'MyProject'
            ConnectionName = 'MyAzureServiceConnection'
            GroupName      = '[MyProject]\Contributors'
        }
    }
}

Commands

Resources

Clone this wiki locally