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
#Customer intent: As a .NET developer, I want to use feature flags to control feature availability quickly and confidently.
15
15
---
@@ -63,9 +63,68 @@ You can use Visual Studio to create a new console app project.
63
63
using Microsoft.FeatureManagement;
64
64
```
65
65
66
-
1. Connect to App Configuration, specifying the `UseFeatureFlags` option so that feature flags are retrieved. Create a `ConfigurationFeatureDefinitionProvider` to provide feature flag definition from the configuration and a `FeatureManager` to evaluate feature flags' state. Then display a message if the `Beta` feature flag is enabled.
66
+
1. Update *Program.cs*. to connect to your App Configuration store using Microsoft Entra ID (recommended) or a connection string, and specify the `UseFeatureFlags` option so that feature flags are retrieved. Create a `ConfigurationFeatureDefinitionProvider` to provide feature flag definition from the configuration and a `FeatureManager` to evaluate feature flags' state. Then display a message if the `Beta` feature flag is enabled.
67
67
68
-
### [.NET](#tab/dotnet)
68
+
### [Microsoft Entra ID (recommended)](#tab/entra-id)
69
+
70
+
You use the `DefaultAzureCredential` to authenticate to your App Configuration store by default. 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.
71
+
72
+
#### .NET
73
+
74
+
```csharp
75
+
IConfiguration configuration = new ConfigurationBuilder()
### [Microsoft Entra ID (recommended)](#tab/entra-id)
126
184
127
-
If you use the Windows command prompt, run the following command.
185
+
Set an environment variable named **Endpoint** to the endpoint of your App Configuration store found under the **Overview** of your store in the Azure portal.
If you use Windows PowerShell, run the following command.
207
+
Set an environment variable named **ConnectionString** to the read-only connection string of your App Configuration store found under **Access settings** of your store in the Azure portal.
138
208
139
-
```azurepowershell
209
+
If you use the Windows command prompt, run the following command:
0 commit comments