Get-AzResourceGroup
on -Id
requires Set-AzContext
to given sub first, unlike how Get-AzResource
works
#21725
Labels
Azure PS Team
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
customer-reported
Investigate 🔍
Description
Get-AzResourceGroup -Id <resourcegroupid>
fail with "Provided resource group does not exist", until youSet-AzContext
to the subscription the resource group in question is located.This is inconsistent with how
Get-AzResource -ResourceId
works. If-ResourceId
is given, the rest call uses it vs. current Az scope.Issue script & Debug output
Environment data
Windows PowerShell 5.1
Module versions
Error output
No response
The text was updated successfully, but these errors were encountered: