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
Copy file name to clipboardExpand all lines: sdk/identity/Azure.Identity/samples/OtherCredentialSamples.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,11 @@ To use `AzurePipelinesCredential`, configure the following values in the constru
11
11
12
12
1.`clientId`: Client ID from your user-assigned managed identity OR Application (client) ID from your app registration.
13
13
2.`tenantId`: Tenant ID from your user-assigned managed identity OR Directory (tenant) ID from your app registration.
14
-
3.`serviceConnectionId`: The service connection ID is the **GUID representing your service connection**. The value is obtained by looking at the browser's address bar when you navigate to a service connection in the Azure Pipelines. It's the `resourceId` value, as found in the URL's query string.
15
-

16
-
4.`systemAccessToken`: [See how to configure the predefined system variable System.AccessToken for the Azure Pipelines task](https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#systemaccesstoken). This is the value you'll pass to the credential's constructor.
14
+
3.`serviceConnectionId`: The service connection ID is the **GUID representing your service connection**. Once you navigate to an Azure Pipelines service connection details page, the value is obtained in one of the following ways:
15
+
1. Copy the **ID:** value that appears below the service connection name.
16
+
1. Copy the `resourceId` value from the querystring of the page's URL.
17
+

18
+
1.`systemAccessToken`: [See how to configure the predefined system variable System.AccessToken for the Azure Pipelines task](https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#systemaccesstoken). This is the value you'll pass to the credential's constructor.
17
19
18
20
## Example of using an Azure Pipelines task
19
21
@@ -62,7 +64,6 @@ var client = new SecretClient(new Uri("https://keyvault-name.vault.azure.net/"),
62
64
63
65
***Note:*** This credential is **not** included in the `DefaultAzureCredential` chain.
64
66
65
-
66
67
# OnBehalfOfCredential with Managed Identity FIC Example
67
68
68
69
This example demonstrates the use of the `OnBehalfOfCredential` to authenticate the Key Vault `SecretClient` using a managed identity as the client assertion. More information about the On Behalf Of Flow can be found [here](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-on-behalf-of-flow).
0 commit comments