Table of Contents

Initialize-CafAdoToARMServiceConnection

Creates a service connection from Azure DevOps to Azure Resource Manager.

Syntax

Initialize-CafAdoToARMServiceConnection
    [-DevOpsOrganizationName <string>]
    [-DevOpsProjectName <string>]
    [-ManagementGroupId <string>]
    [-ServiceConnectionName <string>]
    [-ServiceConnectionScope <string>]
    [-ServicePrincipalId <string>]
    [-SubscriptionId <string>]
    [-SubscriptionName <string>]
    [-TenantId <string>]
    [-Type <string>]
    [-WhatIf]

Description

Creates a manual secret or federated service connection for the specified Azure DevOps project using an already created service principal. Supports both subscription-scoped and management-group-scoped connections.

Example

Initialize-CafAdoToARMServiceConnection
    -ServicePrincipalId "xxxxxx"
    -SubscriptionId "xxxxxxx"
    -SubscriptionName "lz-dd-test"

Parameter

-DevOpsOrganizationName The name of the Azure DevOps organization.

Property Value
Type: string
Default value: None
Required: False

-DevOpsProjectName The name of the Azure DevOps project.

Property Value
Type: string
Default value: None
Required: False

-ManagementGroupId The ID of the management group. Required when -ServiceConnectionScope is set to managementGroup.

Property Value
Type: string
Default value: None
Required: False

-ServiceConnectionName The name of the service connection to create.

Property Value
Type: string
Default value: None
Required: False

-ServiceConnectionScope The Azure access scope for the service connection.

Property Value
Type: string
Allowed values: ["subscription", "managementGroup"]
Default value: "subscription"
Required: False

-ServicePrincipalId The Application (Client) ID of the service principal.

Property Value
Type: string
Default value: None
Required: False

-SubscriptionId The ID of the Azure subscription.

Property Value
Type: string
Default value: None
Required: False

-SubscriptionName The name of the Azure subscription.

Property Value
Type: string
Default value: None
Required: False

-TenantId The ID of the Azure AD tenant.

Property Value
Type: string
Default value: None
Required: False

-Type The type of service connection to create.

Property Value
Type: string
Allowed values: ["secretBased", "federated"]
Default value: "federated"
Required: False

-WhatIf
If specified, shows what would happen without making any changes.

Property Value
Type: SwitchParameter
Default value: False
Required: False