Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Unable to access azure key vault secrets wih ADAL token #38

Description

I am successfully able to retrieve a token using the gem and authenticate against Azure Service Management API. Using the same token, I can also use the Azure Key Vault REST API to retrieve my vault:

https://msdn.microsoft.com/en-us/library/azure/mt620026.aspx

However, when trying to retrieve a secret from my vault:

https://msdn.microsoft.com/en-us/library/azure/dn903633.aspx

This returns a 401 Unauthorized.

I recently found this stackoverflow post and it suggests that when making a token request, I need to pass a resource header:

When you make the request for the Bearer token, make sure that you include the "resource" header, and that it is set to "https://vault.azure.net". If you don't, you'll get a token, but you won't be able to access any vault data with it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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