Skip to content

Commit c860099

Browse files
Apply suggestion
Co-authored-by: Zhiyuan Liang <[email protected]>
1 parent 2365db5 commit c860099

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

articles/azure-app-configuration/quickstart-javascript.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,14 @@ The following code snippet creates an instance of **AppConfigurationClient**. Yo
183183
You use the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role. Be sure to allow sufficient time for the permission to propagate before running your application.
184184

185185
```javascript
186-
const azureIdentity = require("@azure/identity");
187-
const appConfig = require("@azure/app-configuration");
186+
const { DefaultAzureCredential } = require("@azure/identity");
187+
const { AppConfigurationClient } = require("@azure/app-configuration");
188188

189-
const credential = new azureIdentity.DefaultAzureCredential();
190-
const client = new appConfig.AppConfigurationClient(
189+
const client = new AppConfigurationClient(
191190
process.env.AZURE_APPCONFIG_ENDPOINT,
192-
credential
191+
new DefaultAzureCredential()
193192
);
194193

195-
```
196194

197195
### [Connection string](#tab/connection-string)
198196

0 commit comments

Comments
 (0)