You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use automation to create Azure Resource Manager service connections with workload identity for consistency, efficiency, repeatability, and scalability in your DevOps projects. Scripts guarantee that service connections are configured the same way every time, reduce the risk of human error, and save time, especially when you set up multiple connections or deploy to different environments. Automation also lets you scale so you can better manage large deployments.
17
+
Learn how to use scripts to create Azure Resource Manager service connections with workload identity in Azure Pipelines. Scripts ensure consistency, efficiency, and repeatability when setting up service connections, reducing the risk of human error. They save time, especially when creating multiple connections or deploying to different environments. These scripts can also be integrated into an automation process to scale and better manage large deployments.
18
18
19
-
Automation also helps enforce security policies and compliance requirements by making sure service connections use the right permissions and configurations. It also serves as documentation for the setup process.
19
+
Using scripts as part of an automation process helps enforce security policies and compliance requirements by ensuring service connections use the correct permissions and configurations. It also serves as documentation for the setup process.
20
20
21
21
## Prerequisites
22
22
@@ -44,7 +44,7 @@ This table provides an overview of the key properties exchanged between the crea
44
44
| Create federated credential in Microsoft Entra or Azure |`appId`, `workloadIdentityFederationIssuer`, `workloadIdentityFederationSubject`||
45
45
| Create role assignment in Azure |`principalId`||
46
46
47
-
## Sign in with Azure CLI
47
+
## 1. Sign in with Azure CLI
48
48
49
49
The following commands use the Azure CLI. Sign in to the intended tenant:
50
50
@@ -54,9 +54,9 @@ az login --tenant TENANT_ID
54
54
55
55
Learn more in [Authenticate to Azure using Azure CLI](/cli/azure/authenticate-azure-cli).
56
56
57
-
## Create identity
57
+
## 2. Create identity
58
58
59
-
Create an identity using an app registration or a managed identity.
59
+
Create an identity using managed identity or an app registration.
@@ -102,7 +102,7 @@ For more information, see [az ad sp create-for-rbac](/cli/azure/ad/sp#az-ad-sp-c
102
102
103
103
---
104
104
105
-
## Create a service connection
105
+
## 3. Create a service connection
106
106
107
107
This example uses the [Azure DevOps Azure CLI extension](/azure/devops/cli) and a configuration file to create the service connection. This configures the identity created in a new Azure service connection. The `servicePrincipalId` authorization parameter is populated with the `appId` of the identity.
For more information about this command, see [Azure DevOps CLI service endpoint](/azure/devops/cli/service-endpoint).
166
166
167
-
## Create a federated identity credential
167
+
## 4. Create a federated identity credential
168
168
169
169
Create a federated credential using the `workloadIdentityFederationIssuer` and `workloadIdentityFederationSubject` output from the __Create a service connection__ step.
170
170
@@ -211,7 +211,7 @@ For more information about this command, see [az ad app federated-credential cre
211
211
212
212
---
213
213
214
-
## Create role assignment
214
+
## 5. Create role assignment
215
215
216
216
Add a role assignment to your managed identity or app registration with `az role assignment create`. For available roles, see [Azure built-in roles](/azure/role-based-access-control/built-in-roles). The assignee of the role is the service principal associated with the app registration or managed identity. A service principal is identified by its ID, also called `principalId`. The `principalId` is in the output of the __Create identity__ command.
0 commit comments