The Error
App start:
Azure.RequestFailedException: 401 UnauthorizedQuick Fix - 1 Min
1. Local dev: az login. 2. Managed Identity: Enable on App Service. 3. KeyVault Access Policy: Grant Get/List to app. 4. Code: builder.Configuration.AddAzureKeyVault(new Uri(vaultUri), new DefaultAzureCredential())
Root Cause
App identity not authorized. Missing access policy or not logged in locally.
Related fixes: 401 in Visual Studio | 401 in Docker
No comments yet. Be the first to share your thoughts!