key-vault-dotnet-core-quickstart icon indicating copy to clipboard operation
key-vault-dotnet-core-quickstart copied to clipboard

Missing list permission on keyvault leads to 502.5 error

Open mattdufeu opened this issue 7 years ago • 0 comments

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Unfortunately, I think it's the very last step

Any log messages given by the failure

502.5 Process Failure when browsing to the URL of the app. When looking in the Diagnostic Console, I get this exception when trying to run the app:

D:\home\site\wwwroot>dotnet .\key-vault-dotnet-core-quickstart.dll

Unhandled Exception: Microsoft.Azure.KeyVault.Models.KeyVaultErrorException: Operation returned an invalid status code 'Forbidden'

Expected/desired behavior

I'm able to browse to the about page of the app

OS and Version?

Azure (Windows 10 local but doubt that matters)

Versions

Mention any other details that might be useful

I think it's to do with permissions on the Key Vault. If I add the list permission instead of just get, it works, i.e.

    az keyvault set-policy --name '<YourKeyVaultName>' --object-id <PrincipalId> --secret-permissions get list

I'll create a PR for this, presuming it's correct.

mattdufeu avatar Dec 17 '18 14:12 mattdufeu