Azure / Azure/azure-powershell
Invoke−AzRestMethod −Method Get Not Supported for any version
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
From CoPilot
```powershell
$managedIdentity = Get-AzUserAssignedIdentity -ResourceGroupName -Name
$associatedResources = Invoke-AzRestMethod -Method Get -Path "/subscriptions/$($managedIdentity.SubscriptionId)/resourceGroups/$($managedIdentity.ResourceGroupName)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$($managedIdentity.Name)/listAssociatedResources?api-version=2021-09-30-preview"
```
I tried all API Versions
2023-07-31-PREVIEW
2023-01-31
2022-01-31-PREVIEW
2021-09-30-PREVIEW
2018-11-30
2015-08-31-PREVIEW
All Versions reported that Method "Get" was unsupported.
Az cli worked, so I am assuming it was not permissions.
### Issue script & Debug output
```PowerShell
Not applicable / Protected environment
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 7.4.5
PSEdition Core
GitCommitId 7.4.5
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```
### Module versions
```PowerShell
ModuleType Version PreRelease Name
---------- ------- ---------- ----
Script 3.0.0 Az.Accounts
Script 1.2.1 Az.ManagedServiceIdentity
Script 7.1.0 Az.Resources
```
### Error output
```PowerShell
Not applicable
```
Contributor guide
Assessment
This issue has not been assessed yet.