Skip to content

Commit 61bb0c1

Browse files
authored
@azure/identity readme azure -> Azure (Azure#12838)
1 parent cbbaa41 commit 61bb0c1

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

sdk/identity/identity/README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To authenticate in Visual Studio Code, first ensure the [Azure Account Extension
3737

3838
Applications using the `AzureCliCredential`, rather directly or via the `DefaultAzureCredential`, can use the Azure CLI account to authenticate calls in the application when running locally.
3939

40-
To authenticate with the [Azure CLI][azure_cli] users can run the command `az login`. For users running on a system with a default web browser the azure cli will launch the browser to authenticate the user.
40+
To authenticate with the [Azure CLI][azure_cli] users can run the command `az login`. For users running on a system with a default web browser the Azure cli will launch the browser to authenticate the user.
4141

4242
![Azure CLI Account Sign In][azureclilogin_image]
4343

@@ -107,24 +107,32 @@ This example demonstrates authenticating the `KeyClient` from the [@azure/keyvau
107107
```javascript
108108
// The default credential first checks environment variables for configuration as described above.
109109
// If environment configuration is incomplete, it will try managed identity.
110+
111+
// Azure Key Vault service to use
110112
const { KeyClient } = require("@azure/keyvault-keys");
113+
114+
// Azure authentication library to access Azure Key Vault
111115
const { DefaultAzureCredential } = require("@azure/identity");
112116

113117
// Azure SDK clients accept the credential as a parameter
114118
const credential = new DefaultAzureCredential();
119+
120+
// Create authenticated client
115121
const client = new KeyClient(vaultUrl, credential);
122+
123+
// Use service from authenticated client
116124
const getResult = await client.getKey("MyKeyName");
117125
```
118126

119127
### Specifying a user assigned managed identity with the `DefaultAzureCredential`
120128

121-
Many Azure hosts allow the assignment of a user assigned managed identity. This example demonstrates configuring the `DefaultAzureCredential` to authenticate a user assigned identity when deployed to an azure host. It then authenticates a `KeyClient` from the [@azure/keyvault-keys](https://www.npmjs.com/package/@azure/keyvault-keys) client library with credential.
129+
Many Azure hosts allow the assignment of a user assigned managed identity. This example demonstrates configuring the `DefaultAzureCredential` to authenticate a user assigned identity when deployed to an Azure host. It then authenticates a `KeyClient` from the [@azure/keyvault-keys](https://www.npmjs.com/package/@azure/keyvault-keys) client library with credential.
122130

123131
```ts
124132
const { KeyClient } = require("@azure/keyvault-keys");
125133
const { DefaultAzureCredential } = require("@azure/identity");
126134

127-
// when deployed to an azure host the default azure credential will authenticate the specified user assigned managed identity
135+
// when deployed to an Azure host the default Azure credential will authenticate the specified user assigned managed identity
128136
var credential = new DefaultAzureCredential({ managedIdentityClientId: userAssignedClientId });
129137

130138
const client = new KeyClient(vaultUrl, credential);
@@ -157,7 +165,7 @@ const client = new KeyClient(vaultUrl, credentialChain);
157165
| `DefaultAzureCredential` | provides a simplified authentication experience to quickly start developing applications run in the Azure cloud |
158166
| `ChainedTokenCredential` | allows users to define custom authentication flows composing multiple credentials |
159167
| `EnvironmentCredential` | authenticates a service principal or user via credential information specified in environment variables |
160-
| `ManagedIdentityCredential` | authenticates the managed identity of an azure resource |
168+
| `ManagedIdentityCredential` | authenticates the managed identity of an Azure resource |
161169

162170
### Authenticating Service Principals
163171

0 commit comments

Comments
 (0)