Skip to content

Commit 2da7224

Browse files
committed
edits
1 parent 2303237 commit 2da7224

File tree

5 files changed

+40
-30
lines changed

5 files changed

+40
-30
lines changed

docs/pipelines/library/connect-to-azure.md

+19-17
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ You have multiple options for connecting to Azure by using Azure Resource Manage
2525
* Service principal with secret
2626
* Agent-assigned managed identity
2727

28-
> To learn about other types of connections and for general information about creating and using connections, see [Service connections for builds and releases](service-endpoints.md).
28+
To learn about other types of connections and for general information about creating and using connections, see [Service connections for builds and releases](service-endpoints.md).
2929

3030
::: moniker range="azure-devops"
3131

3232
<a name="create-an-azure-resource-manager-service-connection-using-workload-identity-federation"></a>
3333

3434
## Create an Azure Resource Manager service connection that uses workload identity federation
3535

36-
[Workload identity federation](/azure/active-directory/workload-identities/workload-identity-federation) uses OpenID Connect to authenticate with Microsoft Entra protected resources without needing to manage secrets.
36+
[Workload identity federation](/azure/active-directory/workload-identities/workload-identity-federation) uses OpenID Connect (OIDC) to authenticate with Microsoft Entra protected resources without using secrets.
3737

3838
We recommend that you use this approach if all the following items are true for your scenario:
3939

@@ -44,15 +44,17 @@ We recommend that you use this approach if all the following items are true for
4444

4545
### Create a new workload identity federation service connection
4646

47-
1. In the Azure DevOps project, go to **Project settings** > **Service connections** [project settings page](../../project/navigation/go-to-service-page.md#open-project-settings).
47+
1. In the Azure DevOps project, go to **Project settings** > **Service connections**.
48+
49+
For more information, see [Open project settings](../../project/navigation/go-to-service-page.md#open-project-settings).
4850

4951
1. Select **New service connection**, and then select **Azure Resource Manager**.
5052

51-
![Screenshot that shows choosing a workload identity service connection type.](media/new-service-connection-azure-resource-manager.png)
53+
:::image type="content" source="media/new-service-connection-azure-resource-manager.png" alt-text="Screenshot that shows choosing a workload identity service connection type.":::
5254

5355
1. Select **Workload identity federation (automatic)**.
5456

55-
![Screenshot that shows selecting a workload identity service connection type.](media/select-workload-identity-service.png)
57+
:::image type="content" source="media/select-workload-identity-service.png" alt-text="Screenshot that shows selecting a workload identity service connection type.":::
5658

5759
1. Specify the following parameters:
5860

@@ -103,7 +105,7 @@ To revert a service connection:
103105

104106
1. Select **Revert conversion to the original scheme**.
105107

106-
:::image type="content" source="media/federated-revert-credential.png" alt-text="Screenshot that shows selecting revert for a federated credential.":::
108+
:::image type="content" source="media/federated-revert-credential.png" alt-text="Screenshot that shows selecting revert for a federated credential.":::
107109

108110
1. Select **Revert** again to confirm your choice.
109111

@@ -130,7 +132,7 @@ To create the service connection:
130132

131133
1. Select **New service connection**, and then select **Azure Resource Manager**.
132134

133-
![Screenshot that shows choosing a service connection type.](media/new-service-endpoint-2.png)
135+
:::image type="content" source="media/new-service-endpoint-2.png" alt-text="Screenshot that shows choosing a service connection type.":::
134136

135137
1. Enter or select the following parameters:
136138

@@ -156,7 +158,7 @@ To create the service connection:
156158
>
157159
> When you follow this approach, Azure DevOps *connects with Microsoft Entra ID and creates an app registration with a secret that's valid for three months*. When the service connection is about to expire, Microsoft Entra ID displays this prompt: **A certificate or secret is expiring soon. Create a new one**. In this scenario, you must refresh the service connection.
158160
>
159-
> To refresh a service connection, in the Azure DevOps portal, edit the connection and then select **Verify**. After you save the edit, the service connection is valid for another three months.
161+
> To refresh a service connection, in the Azure DevOps portal, edit the connection, and then select **Verify**. After you save the edit, the service connection is valid for another three months.
160162
>
161163
> We recommend that you use workload identity federation instead of creating a secret. If you use workload identity federation, you don't need to rotate secrets, and app registration maintains its intended purpose. To start using workload identity federation, go to the service connection details page and select **Convert**. The service connection is converted to use workload identity federation instead of a secret. For more information, see [Convert an existing Azure Resource Manager service connection to use workload identity federation](#convert-an-existing-azure-resource-manager-service-connection-to-use-workload-identity-federation).
162164
>
@@ -184,11 +186,11 @@ If you have problems using this approach (such as no subscriptions shown in the
184186

185187
1. Select **New service connection**, and then select **Azure Resource Manager**.
186188

187-
![Screenshot that shows choosing a service connection type.](media/new-service-endpoint-2.png)
189+
:::image type="content" source="media/new-service-endpoint-2.png" alt-text="Screenshot that shows choosing a service connection type.":::
188190

189191
1. Select the **Service Principal (manual)** option, and then enter the service principal details.
190192

191-
![Screenshot that shows opening the full version of the service dialog.](media/rm-endpoint-link.png)
193+
:::image type="content" source="media/rm-endpoint-link.png" alt-text="Screenshot that shows opening the full version of the service dialog.":::
192194

193195
1. For **Connection name**, enter a display name to use to refer to this service connection.
194196

@@ -226,7 +228,7 @@ For more information, see [Troubleshoot Azure Resource Manager service connectio
226228

227229
<a name="use-msi"></a>
228230

229-
## Create an Azure Resource Manager service connection to a virtual machine that uses a managed service identity
231+
## Create an Azure Resource Manager service connection to a VM that uses a managed service identity
230232

231233
> [!NOTE]
232234
>
@@ -242,11 +244,11 @@ You can configure Azure VM-based agents to use an [Azure Managed Service Identit
242244

243245
1. Select **New service connection**, and then select **Azure Resource Manager**.
244246

245-
![Screenshot that shows choosing a service connection type.](media/new-service-endpoint-2.png)
247+
:::image type="content" source="media/new-service-endpoint-2.png" alt-text="Screenshot that shows choosing a service connection type.":::
246248

247249
1. Select the **Managed Identity Authentication** option.
248250

249-
![Screenshot that shows going to the managed service identity settings.](media/rm-endpoint-msi.png)
251+
:::image type="content" source="media/rm-endpoint-msi.png" alt-text="Screenshot that shows going to the managed service identity settings.":::
250252

251253
1. For **Connection name**, enter a display name to use when you refer to this service connection.
252254

@@ -270,13 +272,13 @@ You can configure Azure VM-based agents to use an [Azure Managed Service Identit
270272
For more information, see [How can I use managed identities for Azure resources?](/azure/active-directory/managed-identities-azure-resources/overview#how-can-i-use-managed-identities-for-azure-resources) and
271273
[Use role-based access control to manage access to your Azure subscription resources](/azure/role-based-access-control/role-assignments-portal).
272274

273-
For more information, see [Troubleshoot Azure Resource Manager service connections](../release/azure-rm-endpoint.md).
275+
For more information about the process, see [Troubleshoot Azure Resource Manager service connections](../release/azure-rm-endpoint.md).
274276

275277
<a name="connect-govt"></a>
276278

277279
## Connect to an Azure Government Cloud
278280

279-
For information about connecting to an Azure Government Cloud, see [Connecting from Azure Pipelines (Azure Government Cloud)](/azure/azure-government/documentation-government-get-started-connect-with-vsts).
281+
For information about connecting to an Azure Government Cloud, see [Connect from Azure Pipelines (Azure Government Cloud)](/azure/azure-government/documentation-government-get-started-connect-with-vsts).
280282

281283
<a name="connect-stack"></a>
282284

@@ -285,7 +287,7 @@ For information about connecting to an Azure Government Cloud, see [Connecting f
285287
For information about connecting to Azure Stack, see these articles:
286288

287289
* [Connect to Azure Stack](/azure/azure-stack/azure-stack-connect-azure-stack)
288-
* [Connect Azure Stack to Azure by using VPN](/azure/azure-stack/azure-stack-connect-vpn)
289-
* [Connect Azure Stack to Azure by using ExpressRoute](/azure/azure-stack/azure-stack-connect-expressroute)
290+
* [Connect Azure Stack to Azure by using a VPN](/azure/azure-stack/azure-stack-connect-vpn)
291+
* [Connect Azure Stack to Azure by using Azure ExpressRoute](/azure/azure-stack/azure-stack-connect-expressroute)
290292

291293
[!INCLUDE [rm-help-support-shared](../includes/rm-help-support-shared.md)]
Loading
Loading

docs/pipelines/release/configure-workload-identity.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ monikerRange: '>= azure-devops'
1212

1313
# Manually set an Azure Resource Manager workload identity service connection
1414

15-
When you [troubleshoot an Azure Resource Manager workload identity service connection](troubleshoot-workload-identity.md#i-dont-have-permissions-to-create-a-service-principal-in-the-micrososft-entra-tenant), you might need to manually configure the connection instead of using the automated tool.
15+
When you [troubleshoot an Azure Resource Manager workload identity service connection](troubleshoot-workload-identity.md#i-dont-have-permissions-to-create-a-service-principal-in-the-micrososft-entra-tenant), you might need to manually configure the connection instead of using the automated tool that's available in Azure DevOps.
1616

1717
We recommend that you [try the automated approach](../library/connect-to-azure.md#create-an-azure-resource-manager-service-connection-that-uses-workload-identity-federation) before you begin a manual configuration.
1818

1919
There are two options for authentication: use a managed identity or use a service principal. The advantage of the managed identity option is that you can use it if you don't have permissions to create service principals or if you're using a different Microsoft Entra tenant than your Azure DevOps user.
2020

21-
## Workload identity by using managed identity authentication
21+
## Set a workload identity service connection to use managed identity authentication
2222

2323
You might need to manually create a managed identity that uses federated credentials, and then grant the required permissions. You can also use the REST API for this process.
2424

@@ -111,7 +111,7 @@ You might need to manually create a managed identity that uses federated credent
111111

112112
1. In Azure DevOps, select **Verify and save**.
113113

114-
## Workload identity by using service principal authentication
114+
## Set a workload identity service connection to use service principal authentication
115115

116116
You might need to manually create a service principal that has federated credentials, and then grant the required permissions. You can also use the REST API for this process.
117117

@@ -192,7 +192,7 @@ You might need to manually create a service principal that has federated credent
192192

193193
:::image type="content" source="approvals/media/federated-credentials-devops.png" alt-text="Screenshot that shows DevOps credentials for federated authentication.":::
194194

195-
1. In the Azure portal, return to your app registration federated credential.
195+
1. In the Azure portal, return to your app registration federated credentials.
196196

197197
1. Paste the values for **Issuer** and **Subject identifier** that you copied from your Azure DevOps project into your federated credentials in the Azure portal.
198198

docs/pipelines/release/troubleshoot-workload-identity.md

+17-9
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,19 @@ Get help debugging common issues with workload identity service connections. You
1717

1818
## Troubleshooting checklist
1919

20-
Use the following checklist to troubleshoot issues with workload identity service connections.
20+
Use the following checklist to troubleshoot issues with workload identity service connections:
21+
22+
- Review pipeline tasks to ensure that they support workload identity.
23+
- Verify that workload identity federation is active for the tenant.
24+
- Check the issuer URL and federation subject for accuracy.
25+
26+
The following sections describe the issues and how to resolve them.
2127

2228
### Review pipeline tasks
2329

24-
Not all pipelines tasks support workload identity. During the preview, no Azure Marketplace tasks support workload identity service connections. The following tasks don't currently support workload identity federation:
30+
Not all pipelines tasks support workload identity. During the preview, no Azure Marketplace tasks support workload identity service connections.
31+
32+
The following tasks currently don't support workload identity federation:
2533

2634
- AzureCloudPowerShellDeploymentV1
2735
- AzCopy (AzureFileCopyV1, AzureFileCopyV2, AzureFileCopyV3, AzureFileCopyV4, AzureFileCopyV5)
@@ -39,9 +47,9 @@ Verify that there are no Microsoft Entra policies in place that block federated
3947

4048
### Check the issuer URL for accuracy
4149

42-
If you see a message that indicates `no matching federated identity record found`, either the issuer URL or the federation subject doesn't match. The correct issuer URL starts with `https://vstoken.dev.azure.com`.
50+
If you see a message that indicates **no matching federated identity record found**, either the issuer URL or the federation subject don't match. The correct issuer URL starts with `https://vstoken.dev.azure.com`.
4351

44-
You can fix the issuer URL by editing and saving the service connection to update the issuer URL. If Azure DevOps didn't create the identity, the issuer must be updated manually. For Azure identities, the issuer URL automatically updates.
52+
You can fix the issuer URL by editing and saving the service connection to update the issuer URL. If Azure DevOps didn't create the identity, the issuer URL must be updated manually. For Azure identities, the issuer URL automatically updates.
4553

4654
## Common issues
4755

@@ -57,23 +65,23 @@ You must either have permissions in Microsoft Entra ID to create app registratio
5765

5866
You have two options to resolve the issue:
5967

60-
- [Solution 1: Manually configure workload identity by using managed identity authentication](configure-workload-identity.md#workload-identity-by-using-managed-identity-authentication)
61-
- [Solution 2: Manually configure workload identity by using service principal authentication](configure-workload-identity.md#workload-identity-by-using-service-principal-authentication)
68+
- [Solution 1: Manually configure workload identity by using managed identity authentication](configure-workload-identity.md#set-a-workload-identity-service-connection-to-use-managed-identity-authentication)
69+
- [Solution 2: Manually configure workload identity by using service principal authentication](configure-workload-identity.md#set-a-workload-identity-service-connection-to-use-service-principal-authentication)
6270

6371
### I use a container resource that specifies an instance of Azure Container Registry
6472

6573
[Container resources](/azure/devops/pipelines/process/resources?view#define-a-containers-resource) that are pulled from Azure Container Registry don't support a workload identity federation service connection that's specified in `azureSubscription`.
6674

6775
## Error messages
6876

69-
The following table identifies common error messages and an issue that might generate each message:
77+
The following table identifies common error messages and issues that might generate them:
7078

71-
| Message | Plausible issue |
79+
| Message | Possible issue |
7280
|---------|-----------------|
7381
| **cannot request token: Get `?audience=api://AzureADTokenExchange: unsupported protocol scheme`** | The task doesn't support workload identity federation. |
7482
| **Identity not found** | The task doesn't support workload identity federation. |
7583
| **Could not fetch access token for Azure** | The task doesn't support workload identity federation. |
76-
| **AADSTS700016: Application with identifier '****' wasn't found** | The identity that is used for the service connection no longer exists or it might have been removed independently from the service connection. Create a new service connection. |
84+
| **AADSTS700016: Application with identifier '****' wasn't found** | The identity that is used for the service connection no longer exists or it might have been removed from the service connection. In this scenario, create a new service connection. |
7785
| **AADSTS7000215: Invalid client secret provided.** | You're using a service connection that has an expired secret. [Convert the service connection to workload identity federation](https://aka.ms/azdo-rm-workload-identity-conversion) and replace the expired secret with federated credentials. |
7886
| **AADSTS700024: Client assertion is not within its valid time range** | This error might occur in the following cases:<br />- You're using an AzureCLI task with `addSpnToEnvironment` set to `true` to consume the `idToken` environment variable. The `idToken` environment variable expires after 10 minutes.<br />- Some Azure data plane (non-Azure Resource Manager) operations require a separate bearer token to authenticate. You request a bearer token in the Azure CLI by using `az account get-access-token` or in Azure PowerShell by using Get-AzAccessToken. These tokens have a lifetime of one hour. Using the token after one hour results in an `AADSTS700024` error. Some tools and SDKs (for example, [Azure GO SDK](https://github.com/Azure/azure-sdk-for-go) and [Azure Python SDK](/azure/developer/python/sdk/azure-sdk-overview)) use the Azure CLI and `az account get-access-token` indirectly to obtain a bearer token. If you have tasks that (directly or indirectly) obtain a bearer token and run longer than one hour, use a service connection with a secret instead. |
7987
| **AADSTS70021: No matching federated identity record found for presented assertion. Assertion Issuer: `https://app.vstoken.visualstudio.com`.** | The issuer URL isn't correct. The correct issuer URL has the format `https://vstoken.dev.azure.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX`. You can fix the issuer URL by editing and then saving a service connection. If Azure DevOps didn't create your identity, you must manually update the issuer. You can find the correct issuer in the edit dialog of the service connection or in the response (under authorization parameters) if you use the REST API. |

0 commit comments

Comments
 (0)