An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
Thanks for reaching out.
Yes, it is possible to use the web app for the DefaultAzureCredential to authenticate and allow creating of keys, secrets, and certificates. The DefaultAzureCredential class supports multiple authentication methods and determines which method should be used at runtime.
- Environment - The
DefaultAzureCredentialwill read account information specified via environment variables and use it to authenticate.
- For
Environment, we need to set theAzure-ClientID,Client SecretandTenantIDin the Visual Studio localEnvironment Variables.
- Managed Identity - If the application is deployed to an Azure host with Managed Identity enabled, the
DefaultAzureCredentialwill authenticate with that account. To useManaged Identitythe Application has to be deployed in Azure App Service. Reference -https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/keyvault/Azure.Security.KeyVault.Keys/README.md Alternatively, to authenticate using the web app, you can use theInteractiveBrowserCredentialclass provided by the Azure Identity client library. This class allows users to authenticate with Microsoft Entra ID interactively through a web browser. Similar issue - https://stackoverflow.com/questions/69810410/how-to-give-credentials-defaultazurecredential-to-azure-c-sharp-secretclient
Thanks,
Shweta
Please remember to "Accept Answer" if answer helped you.