@Shree Thanks for reaching out. I am bit confused by your requirement. According to the information provided, you have mentioned that you are trying to retrieve configuration setting but the code you are using is not for configuration setting, it's for retrieving feature flags.
Here is sample code reference for retrieving for configuration values and feature flags.
using System;
using Azure.Data.AppConfiguration;
using Azure;
namespace FeatureFlagApp
{
class Program
{
static void Main(string[] args)
{
var client = new ConfigurationClient("Endpoint=https://myappconfig.azconfig.io;Id=xxxxx;Secret=xxxxx");
// Create a new configuration setting
var setting = new ConfigurationSetting("some_key", "some_value");
client.SetConfigurationSetting(setting);
// Retrieve the configuration setting
var key = client.GetConfigurationSetting("some_key");
Console.WriteLine(key.Value);
// Create a new feature flag configuration setting
var featureFlagSetting = new FeatureFlagConfigurationSetting("feature_id", isEnabled: true);
client.SetConfigurationSetting(featureFlagSetting);
// Retrieve the feature flag configuration setting
Response<ConfigurationSetting> response = client.GetConfigurationSetting(FeatureFlagConfigurationSetting.KeyPrefix + "feature_id");
if (response.Value is FeatureFlagConfigurationSetting featureFlag)
{
Console.WriteLine($"Feature flag {featureFlag.FeatureId} IsEnabled: {featureFlag.IsEnabled}");
}
}
}
}