I would like to retrive the keyvault secrets using managed identity in web Api.
- Creates Web APi with DefaultAzureCredential
- Able to retrive the data using aboe code.
- Built image and pushed into Azure container registry
- Created azure container instace using above image
- Provided Key Vault Reader and Key Vault Secrets User by slected the instance using managed identity
- When I try to access the API that reads the data from AzureKeyVault, it is giving 404 erro.
ManagedIdentityCredential authentication failed: DefaultIdentityNotDefined rnStatus: 404 (Not Found)rnErrorCode: DefaultIdentityNotDefinedrnrnContent:rn{rn “error”: {rn “code”: “DefaultIdentityNotDefined
How can I access the keyvault data inside container instace web api?