getting the API error while running azure vault commands in azure cloud shell -bash

Tagirisa, HariKrishna 0 Reputation points
2023-08-14T12:20:13.9866667+00:00

Getting api error which is rare we are using azure key vault and running the commands in azure cloud still not supported api version who has to upgrade azure or me...getting stuck seriously with this please provide the suggestions to move forward.

cmd I used: az keyvault set-policy --name $kvname --object-id $spobjid --secret-permissions backup delete get list recover restore set

Note: I have provided $kvname and $spobjid values properly

User's image

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,151 questions
Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
651 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,321 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,951 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Stefano Mancin 10 Reputation points
    2023-08-18T10:51:38.01+00:00

    Hi, I solved the same issue adding "--resource-group" in the command.

    2 people found this answer helpful.
    0 comments No comments

  2. Sabari Manikandan 5 Reputation points
    2023-08-26T08:01:05.0633333+00:00

    Hi, I have faced the same issue even after az upgrade , It is resolved after adding --resource-group .

    1 person found this answer helpful.
    0 comments No comments

  3. Ramoudi, Ines 0 Reputation points
    2023-10-06T13:45:30.5766667+00:00

    Hello, i'm facing a similar issue and when i add the --resource-group , i get an error stating <ERROR: unrecognized arguments: --resource-group>, any idea why ?