Failed to authenticate an ASP.NET Core app in the Azure app registry for local development #1634
Unanswered
migueltorresc
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have set up an app in the Azure App Registry for local development with ASP.NET Core. I have created object in application registry, also assigned roles to a Microsoft Enter ID group (Storage Blob Data Contributor and Storage Blob Data Reader).
Visual Studio is authenticated with a user account present in Azure and group member set to Enter ID.
Configure the application as follows:
This is the configuration of launchSettings.json:
program.cs:
Dependency injection in controller:
Controller method:
After running the application, an error occurs in the Get method, following line:
await foreach (BlobItem blob in containerClient.GetBlobsAsync())
Error description:
Apparently there is something preventing the authentication to Azure from completing, I followed this documentation:
https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/local-development-service-principal?tabs=azure-portal%2Cwindows%2Ccommand-line
https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/local-development-dev-accounts?tabs=azure-portal%2Csign-in-visual-studio%2Ccommand-line
Beta Was this translation helpful? Give feedback.
All reactions