Skip to content

Missing list permission on keyvault leads to 502.5 error #1

@mattdufeu

Description

@mattdufeu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions