<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Azure AppConfiguration on Journey through Cloud &amp; Code</title><link>https://gurupasupathy.com/tags/azure-appconfiguration/</link><description>Recent content in Azure AppConfiguration on Journey through Cloud &amp; Code</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 21 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://gurupasupathy.com/tags/azure-appconfiguration/index.xml" rel="self" type="application/rss+xml"/><item><title>Access AppConfiguration from Function App using Managed Identity</title><link>https://gurupasupathy.com/post/2026-02-21_access-appconfiguration-from-function-app-using-managed-identity/</link><pubDate>Sat, 21 Feb 2026 00:00:00 +0000</pubDate><guid>https://gurupasupathy.com/post/2026-02-21_access-appconfiguration-from-function-app-using-managed-identity/</guid><description>&lt;p&gt;&lt;img loading="lazy" src="https://gurupasupathy.com/img/1__nTaI7u53YGpj1No72IN6Yw.png"&gt;&lt;/p&gt;
&lt;p&gt;Accessing Azure App Configuration using Managed Identity in Azure Functions is slightly different from accessing other Azure services.&lt;/p&gt;
&lt;p&gt;For most Azure services (Storage, Service Bus, Key Vault), you typically:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enable Managed Identity on the Function&lt;/li&gt;
&lt;li&gt;Grant RBAC access to the resource&lt;/li&gt;
&lt;li&gt;Create the SDK client using DefaultAzureCredential&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, App Configuration is usually loaded as part of the application configuration pipeline at startup, so it must be added via the host builder.&lt;/p&gt;</description><content:encoded><![CDATA[<p><img loading="lazy" src="/img/1__nTaI7u53YGpj1No72IN6Yw.png"></p>
<p>Accessing Azure App Configuration using Managed Identity in Azure Functions is slightly different from accessing other Azure services.</p>
<p>For most Azure services (Storage, Service Bus, Key Vault), you typically:</p>
<ul>
<li>Enable Managed Identity on the Function</li>
<li>Grant RBAC access to the resource</li>
<li>Create the SDK client using DefaultAzureCredential</li>
</ul>
<p>However, App Configuration is usually loaded as part of the application configuration pipeline at startup, so it must be added via the host builder.</p>
<h3 id="prerequisites">Prerequisites</h3>
<ul>
<li>Enable Managed Identity on the Function App</li>
<li>Grant the identity: App Configuration Data Reader on the App Configuration resource</li>
</ul>
<p>Sample code as shown below</p>
<p>var host = new HostBuilder()    <br>
.ConfigureAppConfiguration(builder =&gt;<br>
{<br>
string cs = Environment.GetEnvironmentVariable(&ldquo;ConnectionString&rdquo;);<br>
builder.AddAzureAppConfiguration(options =&gt;<br>
options.Connect(new Uri(@&ldquo;<a href="https://appconfiguri.azconfig.io">https://appconfiguri.azconfig.io</a>&rdquo;), new ManagedIdentityCredential()));<br>
})<br>
.ConfigureFunctionsWebApplication()<br>
.Build();<br>
host.Run();</p>
<p>Note: I’m using ManagedIdentityCredential but the recommend class is DefaultAzureCredential</p>
<h3 id="key-insight">Key Insight</h3>
<ul>
<li>Other Azure services → authenticated when <strong>creating the client</strong></li>
<li>App Configuration → authenticated when <strong>building the configuration provider.</strong> That’s why it must be configured inside <code>ConfigureAppConfiguration()</code>.</li>
</ul>
]]></content:encoded></item></channel></rss>