Skip to content

The "Get-AzKeyVault" but not returning as expected on Azure CLI even on the latest version of az #25509

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

Closed
Papad2005 opened this issue Jul 11, 2024 · 4 comments
Labels
customer-reported issue-addressed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@Papad2005
Copy link

Description

Hello Team,

I have a cx query the "Get-AzKeyVault" but not returning as expected on Azure CLI.

The cmd “Get-AzKeyVault -ResourceGroupName $ccoeKvResourceGroupName -VaultName $ccoeKeyVaultName -SubscriptionId $ccoeKvSubscriptionId” returned with error to Connect-AzAccount with the service principal.

It should pick the subscription as stated in the variables but doesn't it only works when we force it and actually specify the subscription again in the variables .

"Connect-AzAccount -ServicePrincipal -TenantId $Tenantid -Credential -Subscription "belfius-spoke-dev-001" which return as expected.

Get-AzKeyVault (Az.KeyVault) | Microsoft Learn

Thanks for your assistance.

Script or Debug output

No response

Environment data

No response

Module versions

No response

Error output

No response

@Papad2005 Papad2005 added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 11, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported needs-triage This is a new issue that needs to be triaged to the appropriate team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jul 11, 2024
@rach1tarora
Copy link

try this
#24967

@isra-fel
Copy link
Member

It could be an issue with WAM - fixed, please try the latest version.
Also worth noting that if -Subscription doesn't allow specifying subscription not in the current tenant. Run Get-AzContext to get the active tenant. Set-AzContext to switch to another.

@isra-fel isra-fel added issue-addressed and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Aug 26, 2024
Copy link
Contributor

Hi @Papad2005. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

Copy link
Contributor

Hi @Papad2005, since you haven't asked that we "/unresolve" the issue, we'll close this out. If you believe further discussion is needed, please add a comment "/unresolve" to reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported issue-addressed 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

3 participants