Azure / Azure/azure-powershell
Get-AzResourceGroup
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
## Description of the new feature
The Powershell command Get-AzResourceGroup -Id parameter throws an error stating "The provided resource group is not found". This is because the resource group is in another subscription.
The Powershell command Get-AzResource is able to get the details of the resources from another subscription.
Why is the command Get-AzResourceGroup -Id not able to get resource group from another subscription?
## Steps to reproduce
1. Open powershell. Install Az module if it is not available. Command to install "Install-Module -Name Az"
2. Run Get-AzContext
3. Run Get-AzResourceGroup -Id Note: Select a resource group not available in the current context. This will throw an error. "Provided resource group does not exist"
4. Run Get-AzResource -ResourceId Note: Select a resource not available in the current context. This will show the details.
## Environment data
Name Value
---- -----
PSVersion 5.1.18362.628
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.628
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
## Proposed implementation details (optional)
Get-AzResourceGroup -Id should be able to display the details of the resource group in different context or subscription.
Contributor guide
Assessment
This issue has not been assessed yet.