Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"AKV10000: Request is missing a Bearer or PoP token." #24557

Closed
ukbg opened this issue May 22, 2022 · 1 comment
Closed

"AKV10000: Request is missing a Bearer or PoP token." #24557

ukbg opened this issue May 22, 2022 · 1 comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@ukbg
Copy link

ukbg commented May 22, 2022

  • Package Name: azure-keyvault-sercrets
  • Package Version: 4.4.0
  • Operating System: Windows 10 / Linux
  • Python Version: 3.9

Describe the bug
When trying to to retrieve a secret using DefaultAzureCredential() from azure.identity as credential the argument client = SecretClient(vault_url=key_vault_url, credential=credential) get error {"error":{"code":"Unauthorized","message":"AKV10000: Request is missing a Bearer or PoP token."}}

To Reproduce
Steps to reproduce the behavior:

  1. Follow steps here: https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-python
  2. Attempt to use DefaultAzureCredential(), (Ive tested CLI, Powershell, and SP) with SecretClient to retrieve a secret

Expected behavior
To be able to retrieve a secret from KeyVault / for SecretClient to extract and pass the token from DefaultAzureCredential()

Screenshots

  1. You can see that I'm able to send a message to a message que, but when trying to recieve a secret I get a 401/Unauthorized error
    image
    image
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 22, 2022
@azure-sdk azure-sdk added Client This issue points to a problem in the data-plane of the library. KeyVault needs-team-triage Workflow: This issue needs the team to triage. labels May 22, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 22, 2022
@ukbg
Copy link
Author

ukbg commented May 22, 2022

I've just found and seen another reference point on here, I'm missing .value, this is working as expected : secret = client.get_secret("test").value

This is shown in the docs: https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-python I must have missed it

@ukbg ukbg closed this as completed May 22, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants