Azure / Azure/azure-powershell
`Get-AzResource -ResourceId` v9.0.3 fails with `Unsupported API version` when `2026-03-02-preview` exists
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Description
When the latest available version for provider `Microsoft.App` is `2026-03-02-preview` the `Get-AzResource` runs into `Unsupported API version` as it tries to use that latest version `2026-03-02-preview` instead of the `defaultApiVersion` for `Microsoft.App` (`2025-10-02-preview`). This is unexpected since the following is mentioned in the release notes for `Az.Resources` `v8.0.0`:
> Updated API version of resource types from latest to DefaultApiVersion for cmdlets `*-AzResource` and `Invoke-AzResourceAction`.
This causes intermittent (but very likely to fail) failures with `Unsupported API version`.
I've tested with pwsh 7.5.4 and PowerShell 5.1.26100.7705. Data provided in this issue was captured with pwsh.
The first request `https://management.azure.com/subscriptions/REDACTED/providers/Microsoft.App?api-version=2021-04-01` responds with this information for `Microsoft.App`:
```json
{
"id": "/subscriptions/REDACTED/providers/Microsoft.App",
"namespace": "Microsoft.App",
"authorizations": [
// REDACTED
],
"resourceTypes": [
{
"resourceType": "managedEnvironments",
"locations": [
// REDACTED List
],
"apiVersions": [
"2026-03-02-preview",
"2026-01-01",
"2025-10-02-preview",
"2025-07-01",
"2025-02-02-preview",
"2025-01-01",
"2024-10-02-preview",
"2024-08-02-preview",
"2024-03-01",
"2024-02-02-preview",
"2023-11-02-preview",
"2023-08-01-preview",
"2023-05-02-preview",
"2023-05-01",
"2023-04-01-preview",
"2022-11-01-preview",
"2022-10-01",
"2022-06-01-preview",
"2022-03-01"
],
"defaultApiVersion": "2025-10-02-preview",
"capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, SupportsLocation"
},
// REDACTED Additional contents
{
"resourceType": "jobs",
"locations": [
// REDACTED List
],
"apiVersions": [
"2026-03-02-preview",
"2026-01-01",
"2025-10-02-preview",
"2025-07-01",
"2025-02-02-preview",
"2025-01-01",
"2024-10-02-preview",
"2024-08-02-preview",
"2024-03-01",
"2024-02-02-preview",
"2023-11-02-preview",
"2023-08-01-preview",
"2023-05-02-preview",
"2023-05-01",
"2023-04-01-preview",
"2022-11-01-preview"
],
"defaultApiVersion": "2025-10-02-preview",
"capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, SupportsLocation"
},
// REDACTED Additional contents
}
```
I expect `2025-10-02-preview` would be used, since it is mentioned as the default?
The `Get-AzResource` API then performs HTTP request like: `https://management.azure.com//subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.App/jobs/REDACTED?api-version=2026-03-02-preview`, seemingly selecting newest/first version from `resourceType.apiVersions` instead of `defaultApiVersion`.
That request gets a failed response with this header: `api-supported-versions : 2022-11-01-preview, 2023-04-01-preview, 2023-05-01, 2023-05-02-preview, 2023-08-01-preview, 2023-11-02-preview, 2024-02-02-preview, 2024-03-01, 2024-08-02-preview, 2024-10-02-preview, 2025-01-01, 2025-02-02-preview, 2025-07-01, 2025-10-02-preview, 2026-01-01`
(Note that the `api-supported-versions` does not match the list from the announced `apiVersions`, but that's probably not an issue for this repo, it just exposed the problem with "latest" instead of `defaultApiVersion` being used by `Get-AzResource`.)
Workaround - pass `ApiVersion` to `Get-AzResource`
```
Get-AzResource -ResourceId "" -ApiVersion "2026-01-01"
```
### Issue script & Debug output
```PowerShell
PS> $DebugPreference = 'Continue'
PS> Get-AzResource -ResourceId /subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.App/jobs/REDACTED
DEBUG: Initializing ConditionalAssemblyContext. PSEdition is [Core]. PSVersion is [7.5.4].
DEBUG: Initializing ConditionalAssemblyProvider. AssemblyRootPath is [C:\Users\REDACTED\Documents\PowerShell\Modules\Az.Accounts\5.3.3\StartupScripts\..\lib].
DEBUG: Registering Az shared AssemblyLoadContext.
DEBUG: AssemblyLoadContext registered.
DEBUG: Initializing PSStyle.
DEBUG: Got version 0 of Az
DEBUG: Got version 0 of Az.Accounts
DEBUG: 08:01:31 - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 08:01:31 - GetAzureResourceCmdlet begin processing with ParameterSet 'ByResourceId'.
DEBUG: 08:01:31 - using account id 'REDACTED'...
DEBUG: 08:01:31 - [ConfigManager] Got [False] from [DisplayBreakingChangeWarning], Module = [Az.Resources], Cmdlet = [Get-AzResource].
DEBUG: [Common.Authentication]: Authenticating using Account: 'REDACTED', environment: 'AzureCloud', tenant: 'REDACTED'
DEBUG: 08:01:31 - [ConfigManager] Got nothing from [DisableInstanceDiscovery], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 08:01:31 - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 08:01:31 - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'REDACTED', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'REDACTED'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] ==== GetAccounts started - GetAccounts ====
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] Account id filter: False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Internal cache] Clearing user token cache accessor.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 0. PartitionKey False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Internal cache] Total number of cache partitions found while getting accounts: 1. PartitionKey False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Runtime] Broker supported OS.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [RuntimeBroker] ListWindowsWorkAndSchoolAccounts option was not enabled.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] Returning 1 accounts
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] MSAL MSAL.CoreCLR with assembly version '4.82.1.0'. CorrelationId(REDACTED)
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] LoginHint provided: False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] Account provided: True
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] ForceRefresh: False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - True
HomeAccountId - False
CorrelationId - REDACTED
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
FMI Path:
Credential FMI Path:
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] === Token Acquisition (SilentRequest) started:
Scopes: https://management.core.windows.net//.default
Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] Broker is configured and enabled, attempting to use broker instead.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Runtime] Broker supported OS.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] Can invoke broker. Will attempt to acquire token with broker.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0001] INFO SetAuthorityUri:78 Initializing authority from URI 'https://login.microsoftonline.com/REDACTED/' without authority type, defaulting to MsSts
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:464 Printing Telemetry for Correlation ID: REDACTED
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: start_time, Value: 2026-03-18T07:01:31.000Z
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: api_name, Value: ReadAccountById
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: was_request_throttled, Value: false
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: authority_type, Value: Unknown
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: msal_version, Value: 9.0.0
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: correlation_id, Value: REDACTED
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: broker_app_used, Value: false
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: stop_time, Value: 2026-03-18T07:01:31.000Z
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: msalruntime_version, Value: 0.20.2
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: is_successful, Value: true
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO LogTelemetryData:472 Key: request_duration, Value: 0
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO SetCorrelationId:239 Set correlation ID: REDACTED
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO EnqueueBackgroundRequest:1039 The original authority is 'https://login.microsoftonline.com/REDACTED'
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO ModifyAndValidateAuthParameters:214 Additional query parameter added successfully. Key: '(pii)' Value: '(pii)'
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO ModifyAndValidateAuthParameters:214 Additional query parameter added successfully. Key: '(pii)' Value: '(pii)'
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO ModifyAndValidateAuthParameters:214 Additional query parameter added successfully. Key: '(pii)' Value: '(pii)'
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] INFO ModifyAndValidateAuthParameters:237 Authority Realm: REDACTED
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0002] WARNING TryEnqueueMsaDeviceCredentialAcquisitionAndContinue:1090 MsaDeviceOperationProvider is not available. Not attempting to register the device.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO TryUseStorage:144 Try to read account from universal storage.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO StorageTokenResponse:84 StorageTokenResponse account constructor invoked. This is only expected in Runtime flows
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:464 Printing Telemetry for Correlation ID: REDACTED
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: start_time, Value: 2026-03-18T07:01:31.000Z
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: api_name, Value: AcquireTokenSilently
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: was_request_throttled, Value: false
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: authority_type, Value: AAD
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: access_token_expiry_time, Value: 2026-03-18T07:36:59.000Z
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: read_token, Value: ID|AT
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: msal_version, Value: 9.0.0
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: client_id, Value: 1950a258-227b-4e31-a9cf-717495945fc2
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: correlation_id, Value: REDACTED
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: broker_app_used, Value: false
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: stop_time, Value: 2026-03-18T07:01:31.000Z
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: msalruntime_version, Value: 0.20.2
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: original_authority, Value: https://login.microsoftonline.com/REDACTED
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: additional_query_parameters_count, Value: 3
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: storage_read, Value: DAC|DAT|DID
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: auth_flow, Value: AT
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: is_successful, Value: true
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: authorization_type, Value: WindowsIntegratedAuth
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:472 Key: request_duration, Value: 8
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:477 Printing Execution Flow:
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [MSAL:0003] INFO LogTelemetryData:485 {"t":"4s7uc","tid":2,"ts":0,"l":2},{"t":"4sufd","tid":2,"ts":1,"s":2,"l":2},{"t":"4swgg","tid":2,"ts":1,"s":1,"l":2},{"t":"4swgf","tid":2,"ts":1,"s":1,"l":2},{"t":"4swgi","tid":3,"ts":1,"s":1,"l":2},{"t":"8b2yn","tid":3,"ts":1,"l":2},{"t":"8dqkx","tid":3,"ts":2,"l":2},{"t":"8dqik","tid":3,"ts":2,"l":2},{"t":"4q2di","tid":3,"ts":2,"l":2},{"t":"4qnng","tid":3,"ts":2,"l":2,"a":2,"ie":0},{"t":"4qnnf","tid":3,"ts":3,"l":2,"a":2,"ie":1},{"t":"8dqit","tid":3,"ts":3,"l":2},{"t":"8b2ht","tid":3,"ts":3,"l":2},{"t":"4qnno","tid":3,"ts":3,"l":2,"a":2,"ie":0},{"t":"4qnnn","tid":3,"ts":7,"l":2,"a":2,"ie":1},{"t":"6xuag","tid":3,"ts":7,"l":2}
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [RuntimeBroker] WAM response status success
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] Checking MsalTokenResponse returned from broker.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] Success. Response contains an access token.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] Checking client info returned from the server..
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] Saving token response to cache..
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] [Instance Discovery] Instance discovery is enabled and will be performed
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] Fetching instance discovery from the network from host login.microsoftonline.com.
DEBUG: Request [5a1d118a-3047-4b5d-a736-170433ee0240] GET https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=REDACTED
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
x-ms-client-request-id:5a1d118a-3047-4b5d-a736-170433ee0240
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity.Broker/1.1.0 (.NET 9.0.10; Microsoft Windows 10.0.26200)
client assembly: Azure.Identity.Broker
DEBUG: Response [5a1d118a-3047-4b5d-a736-170433ee0240] 200 OK (00.2s)
Cache-Control:max-age=86400, private
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
Access-Control-Allow-Origin:REDACTED
Access-Control-Allow-Methods:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:8d1f90d0-fbaa-405e-92a8-79eaf40f2100
x-ms-ests-server:REDACTED
x-ms-srs:REDACTED
Content-Security-Policy-Report-Only:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Wed, 18 Mar 2026 07:01:30 GMT
Content-Type:application/json; charset=utf-8
Content-Length:980
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Internal cache] Clearing user token cache accessor.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] [SaveTokenResponseAsync] Saving Id Token and Account in cache ...
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 0. PartitionKey False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Internal cache] Total number of cache partitions found while getting access tokens: 0
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] [CalculateSuggestedCacheExpiry] No access tokens or refresh tokens found in the accessor. Not returning any expiration.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Internal cache] Total number of cache partitions found while getting access tokens: 0
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 0. PartitionKey False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z] [Internal cache] Total number of cache partitions found while getting accounts: 1. PartitionKey False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] AT expiration time: 2026-03-18 07:36:58 +00:00, scopes: https://management.core.windows.net//.default https://management.core.windows.net//user_impersonation. source: Broker
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] Fetched access token from host login.microsoftonline.com.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED]
[LogMetricsFromAuthResult] Cache Refresh Reason: NotApplicable
[LogMetricsFromAuthResult] DurationInCacheInMs: 4
[LogMetricsFromAuthResult] DurationTotalInMs: 333
[LogMetricsFromAuthResult] DurationInHttpInMs: 198
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2026-03-18 07:01:31Z - REDACTED] TokenEndpoint: ****
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2026-03-18T07:36:58.6051945+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'REDACTED', UserId: 'REDACTED'
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/REDACTED/providers/Microsoft.App?api-version=2021-04-01
Headers:
Accept-Language : en-US
x-ms-client-request-id : 516f54dd-a499-4f44-a9b0-4afe643d4eba
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Cache-Control : no-cache
Pragma : no-cache
x-ms-ratelimit-remaining-subscription-reads: 249
x-ms-ratelimit-remaining-subscription-global-reads: 3749
x-ms-request-id : 88bc91d7-651c-40ab-a1bd-15bfaf278c5d
x-ms-correlation-request-id : 88bc91d7-651c-40ab-a1bd-15bfaf278c5d
x-ms-routing-request-id : SWEDENCENTRAL:20260318T070132Z:88bc91d7-651c-40ab-a1bd-15bfaf278c5d
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
X-Cache : CONFIG_NOCACHE
X-MSEdge-Ref : Ref A: 0ED7A618264F4945A12CEC0C2F8AE3FC Ref B: GVX211060217029 Ref C: 2026-03-18T07:01:31Z
Date : Wed, 18 Mar 2026 07:01:31 GMT
Body:
{
"id": "/subscriptions/REDACTED/providers/Microsoft.App",
"namespace": "Microsoft.App",
"authorizations": [
// REDACTED
],
"resourceTypes": [
{
"resourceType": "managedEnvironments",
"locations": [
// REDACTED List
],
"apiVersions": [
"2026-03-02-preview",
"2026-01-01",
"2025-10-02-preview",
"2025-07-01",
"2025-02-02-preview",
"2025-01-01",
"2024-10-02-preview",
"2024-08-02-preview",
"2024-03-01",
"2024-02-02-preview",
"2023-11-02-preview",
"2023-08-01-preview",
"2023-05-02-preview",
"2023-05-01",
"2023-04-01-preview",
"2022-11-01-preview",
"2022-10-01",
"2022-06-01-preview",
"2022-03-01"
],
"defaultApiVersion": "2025-10-02-preview",
"capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, SupportsLocation"
},
// REDACTED Additional contents
{
"resourceType": "jobs",
"locations": [
// REDACTED List
],
"apiVersions": [
"2026-03-02-preview",
"2026-01-01",
"2025-10-02-preview",
"2025-07-01",
"2025-02-02-preview",
"2025-01-01",
"2024-10-02-preview",
"2024-08-02-preview",
"2024-03-01",
"2024-02-02-preview",
"2023-11-02-preview",
"2023-08-01-preview",
"2023-05-02-preview",
"2023-05-01",
"2023-04-01-preview",
"2022-11-01-preview"
],
"defaultApiVersion": "2025-10-02-preview",
"capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, SupportsLocation"
},
// REDACTED Additional contents
}
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com//subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.App/jobs/REDACTED?api-version=2026-03-02-preview
Headers:
Accept-Language : en-US
x-ms-client-request-id : 516f54dd-a499-4f44-a9b0-4afe643d4eba
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
BadRequest
Headers:
Cache-Control : no-cache
Pragma : no-cache
x-ms-ratelimit-remaining-subscription-reads: 249
api-supported-versions : 2022-11-01-preview, 2023-04-01-preview, 2023-05-01, 2023-05-02-preview, 2023-08-01-preview, 2023-11-02-preview, 2024-02-02-preview, 2024-03-01, 2024-08-02-preview, 2024-10-02-preview, 2025-01-01, 2025-02-02-preview, 2025-07-01, 2025-10-02-preview, 2026-01-01
X-Powered-By : ASP.NET
x-ms-ratelimit-remaining-subscription-global-reads: 3749
x-ms-request-id : 6513f86b-f6e1-4785-9bfa-410f6068e78e
x-ms-correlation-request-id : 6513f86b-f6e1-4785-9bfa-410f6068e78e
x-ms-routing-request-id : EASTUS:20260318T070132Z:6513f86b-f6e1-4785-9bfa-410f6068e78e
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
X-Cache : CONFIG_NOCACHE
X-MSEdge-Ref : Ref A: 70A5F9DE2F5A4FDA8FAA032A8F97EEF5 Ref B: GVX211060217029 Ref C: 2026-03-18T07:01:32Z
Date : Wed, 18 Mar 2026 07:01:32 GMT
Body:
{
"error": {
"message": "Unsupported API version",
"target": "Unsupported API version",
"innerError": {
"message": "The HTTP resource that matches the request URI 'https://rp.eastus.internal.capps.azure.net/subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.App/jobs/REDACTED' does not support the API version '2026-03-02-preview'."
}
}
}
DEBUG: 08:01:32 - [ResourceManagerCmdletBase.ExecuteCmdlet] Caught unhandled exception: Microsoft.Rest.Azure.CloudException: Unsupported API version
at Microsoft.Azure.Management.ResourceManager.ResourcesOperations.GetByIdWithHttpMessagesAsync(String resourceId, String apiVersion, Dictionary`2 customHeaders, CancellationToken cancellationToken)
at Microsoft.Azure.Management.ResourceManager.ResourcesOperationsExtensions.GetByIdAsync(IResourcesOperations operations, String resourceId, String apiVersion, CancellationToken cancellationToken)
at Microsoft.Azure.Management.ResourceManager.ResourcesOperationsExtensions.GetById(IResourcesOperations operations, String resourceId, String apiVersion)
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient.ResourceManagerSdkClient.GetById(String resourceId, String apiVersion)
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet.OnProcessRecord()
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
DEBUG: 08:01:32 - [ConfigManager] Got nothing from [EnableErrorRecordsPersistence], Module = [Az.Resources], Cmdlet = [Get-AzResource]. Returning default value [False].
Get-AzResource: Unsupported API version
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 6513f86b-f6e1-4785-9bfa-410f6068e78e
DEBUG: 08:01:32 - [ConfigManager] Got [False] from [DisplayBreakingChangeWarning], Module = [Az.Resources], Cmdlet = [Get-AzResource].
DEBUG: 08:01:32 - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 08:01:32 - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 08:01:32 - No authentication telemetry is found for the current cmdlet with Id 516f54dd-a499-4f44-a9b0-4afe643d4eba.
DEBUG: AzureQoSEvent: Module: Az.Resources:9.0.3; CommandName: Get-AzResource; PSVersion: 7.5.4; IsSuccess: False; Duration: 00:00:01.8973390; SanitizeDuration: 00:00:00; Exception: Unsupported API version
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 6513f86b-f6e1-4785-9bfa-410f6068e78e;
DEBUG: 08:01:32 - [ConfigManager] Got [True] from [EnableDataCollection], Module = [], Cmdlet = [].
DEBUG: 08:01:33 - GetAzureResourceCmdlet end processing.
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.26200
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 ExportedCommands
---------- ------- ---------- ---- ----------------
Script 5.3.3 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 9.0.3 Az.Resources {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}
```
### Error output
```PowerShell
RequestId :
Message : Unsupported API version
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 6513f86b-f6e1-4785-9bfa-410f6068e78e
ServerMessage :
ServerResponse :
RequestMessage :
InvocationInfo : {Get-AzResource}
Line : Get-AzResource -ResourceId /subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.App/jobs/REDACTED
Position : At line:1 char:1
+ Get-AzResource -ResourceId /subscriptions/REDACTED …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace : at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.HandleException(ExceptionDispatchInfo capturedException)
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.b__3_0(T c)
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor)
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
```
Contributor guide
Research direction
Start at the Get-AzResource -ResourceId path and compare its API-version selection with the reported defaultApiVersion and apiVersions response. Reproduce with Microsoft.App/jobs and verify that omitting -ApiVersion uses 2025-10-02-preview rather than 2026-03-02-preview; add regression coverage if this cmdlet has an existing test entry point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100