-
Notifications
You must be signed in to change notification settings - Fork 3k
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
"Invalid value was provided for 'accessPolicies'" when no value was provided #9763
Comments
Just come across this too on azure-cli 2.0.69 |
Same - version 2.0.69 |
Same - version 2.0.71 |
Same - version 2.0.72 |
This command works fine on a Linux (debian 9.11) Azure VM
Please share the complete command that results in the error. Also, please share the |
Same Python location '/usr/bin/python2.7' Python (Linux) 2.7.5 (default, May 20 2019, 12:21:26) |
I have reproduced the issue by specifiying an invalid GUID as |
Hi service team, could you please refine this error message? |
Same issue here... If the code is open source tomorrow i will debug it.. msrest.http_logger : Response status: 400
msrest.http_logger : Response headers:
msrest.http_logger : 'Cache-Control': 'no-cache'
msrest.http_logger : 'Pragma': 'no-cache'
msrest.http_logger : 'Content-Length': '95'
msrest.http_logger : 'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger : 'Expires': '-1'
msrest.http_logger : 'x-ms-keyvault-service-version': '1.1.0.276'
msrest.http_logger : 'x-ms-request-id': 'asd34-d4f2-4b80-sdf32-6ac908cc967f'
msrest.http_logger : 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
msrest.http_logger : 'X-Content-Type-Options': 'nosniff'
msrest.http_logger : 'Server': 'Microsoft-IIS/10.0'
msrest.http_logger : 'X-AspNet-Version': '4.0.30319'
msrest.http_logger : 'X-Powered-By': 'ASP.NET'
msrest.http_logger : 'x-ms-ratelimit-remaining-subscription-writes': '1199'
msrest.http_logger : 'x-ms-correlation-request-id': 'ddfsdf3-20c4-4db4-8245-qqweqwe2'
msrest.http_logger : 'x-ms-routing-request-id': 'WESTEUROPE:20200331T182750Z:f7dfdf35cf3-20c4-asdasd-8245-aaasd2'
msrest.http_logger : 'Date': 'Tue, 31 Mar 2020 18:27:50 GMT'
msrest.http_logger : Response content:
msrest.http_logger : {"error":{"code":"BadRequest","message":"An invalid value was provided for 'accessPolicies'."}}
msrest.exceptions : An invalid value was provided for 'accessPolicies'. |
Somehow my problem was cache.. After restarting the self-host agent it started working.. |
@brunomartinspro I'm running into the same issue as well. What self-host agent did you restart? We have an Azure subscription running in the cloud. |
Based on other answers here I used the --objectId of a Azure AD app registration I wanted to register in Key Vault so it could have permissions to purge everything when soft delete was active. az --% keyvault set-policy --name “Dracula-Vault” --object-id AZADAPP_OBJECTID --key-permissions get create list purge --certificate-permissions get create list purge --secret-permissions get list purge I registered self hosted agents in the cloud, running on docker with Kubernetes. https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/docker I spent hours looking into the source code, trying multiple solutions and had no success until I restarted the self hosted agent. After restarting all the steps worked on azure DevOps, I assume it’s cache because when I destroy the Kubernetes Deployment and run a new instance of the agent from scratch it still works. I’m still puzzled. Btw i also made a tutorial for setting up the docker agents on kubernetes if you want to set it up. |
ping @bim-msft |
This was a product bug and has been fixed. |
Please reopen, as it seems to be not fixed Error: |
I had the same error here from this command:
It turned out that my previous command to get the |
Hello @freeone3000 @ross-p-smith @rfink @mikedrumgcom @jiasli @yugangw-msft @norbitrial @hoangpx @yonzhan @brunomartinspro @bim-msft @wolesolana @sebansal @akshaymathur3 I am aware that the issue thread is closed but I recently encountered the same issue and I could resolve using Microsoft Support. Hence thought of putting it here with as much details as possible, if in case someone stumbles into this thread, while looking for a resolution. Let me explain my issue use case:-
What all I did:-
I then raise an support request. Running below Powershell script fixed all the wrongly formatted access policy entries on the Key Vault to the expected format and updates the resource properties at ARM-layer.
Check what the current policies are:-
Fix invalid GUIDs:-
Check the new policies:-
Update the vault in ARM:-
It worked!!! Post running the Script, I could add my account in Key Vault Access policy and also could change Key Vault Firewall Settings. Hope this helps. Many Thanks |
I'd expect an error from Azure or Azure CLI client. Instead, I get this error that doesn't tell me what went wrong.
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az keyvault set-policy
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az keyvault set-policy --name {} --object-id {} --secret-permissions list --debug
Expected Behavior
Environment Summary
Additional Context
The text was updated successfully, but these errors were encountered: