Skip to content

Commit 36b0794

Browse files
committed
Resolving issues
1 parent 7f1660c commit 36b0794

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

articles/azure-app-configuration/use-variant-feature-flags-aspnet-core.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,17 @@ In this tutorial, you'll use a variant feature flag to manage experiences for di
4848
4949
## Connect to App Configuration for feature management
5050
51-
1. In *Program.cs*, under the line `var builder = WebApplication.CreateBuilder(args);`, add the App Configuration provider, which pulls down the configuration from Azure App Configuration when the application starts. See the [.NET provider quickstart](./quickstart-dotnet-core-app?tabs=entra-id#connect-to-an-app-configuration-store) for more on authenticating with the provider. By default, the UseFeatureFlags method includes all feature flags with no label.
51+
1. In *Program.cs*, add the following using statements.
52+
53+
```csharp
54+
using Azure.Identity;
55+
using Microsoft.Extensions.Configuration.AzureAppConfiguration;
56+
using Microsoft.FeatureManagement;
57+
```
58+
59+
1. In *Program.cs*, under the line `var builder = WebApplication.CreateBuilder(args);`, add the App Configuration provider, which pulls down the configuration from Azure App Configuration when the application starts. By default, the `UseFeatureFlags` method pulls down all feature flags with no label.
60+
61+
You use the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac#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.
5262
5363
```csharp
5464
builder.Configuration
@@ -61,12 +71,6 @@ In this tutorial, you'll use a variant feature flag to manage experiences for di
6171
});
6272
```
6373
64-
1. In *Program.cs*, add the following using statements.
65-
66-
```csharp
67-
using Microsoft.FeatureManagement;
68-
```
69-
7074
1. Add Azure App Configuration and feature management services and enable targeting for feature management.
7175
7276
```csharp

0 commit comments

Comments
 (0)