## The problem

Connecting with x.Connect(new Uri("your service endpoint URL"), new ManagedIdentityCredential()) throws "No managed identity endpoint found". The code runs in Azure App Service and the app crashes with an unhandled Azure.Identity exception.

## What fixed it

This happens when the managed identity is not actually enabled on the host. In the Azure portal, open the App Service, go to Identity under Settings, and make sure Status is On under the System assigned tab. Also confirm the identity has the Azure App Configuration Data Reader role on the store, without the data-plane role you will get 401/403 instead. Note that ManagedIdentityCredential has no endpoint when running locally, so use a connection string for local development.