Skip to content

Commit a24a4f3

Browse files
use azure credential
1 parent 1e2b3ca commit a24a4f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

articles/azure-app-configuration/feature-management-javascript-reference.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,12 @@ The Azure App Configuration service also delivers the feature flags to your appl
120120
The App Configuration JavaScript provider provides feature flags in as a `Map` object. The built-in `ConfigurationMapFeatureFlagProvider` helps to load feature flags in this case.
121121

122122
``` javascript
123+
import { DefaultAzureCredential } from "@azure/identity";
123124
import { load } from "@azure/app-configuration-provider";
124125

125-
const appConfig = await load(connectionString, {featureFlagOptions: { enabled: true }}); // load feature flags from Azure App Configuration service
126+
const appConfig = await load("YOUR_APP-CONFIG-ENDPOINT",
127+
new DefaultAzureCredential(), // For more information: https://learn.microsoft.com/javascript/api/overview/azure/identity-readme
128+
{featureFlagOptions: { enabled: true }}); // load feature flags from Azure App Configuration service
126129
const featureProvider = new ConfigurationMapFeatureFlagProvider(appConfig);
127130
const featureManager = new FeatureManager(featureProvider);
128131
```

0 commit comments

Comments
 (0)