Azure / Azure/azure-powershell
Get-AzAppConfigurationKeyValue fails with "The 'file' scheme is not supported."
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Description
Get-AzAppConfigurationKeyValue fails with "The 'file' scheme is not supported."

### Issue script & Debug output
```PowerShell
Get-AzAppConfigurationKeyValue -endpoint https://xxx.azconfig.io *> cc.txt
....
{
"etag": "fggdfgdfgdf",
"key": "common:SomeSvc:SpveValueXXX",
"label": "iii",
"content_type": null,
"value": "https://xxx.xxx.com",
"tags": {},
"locked": false,
"last_modified": "2024-09-24T16:49:54+00:00"
}
],
"@nextLink": "/kv?label=iii&api-version=1.0&after=ldlfglddnknnfnl"
}
....
============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
file:///kv%3Flabel=iii&api-version=1.0&after=dsdfsdfsdfdsf
Headers:
x-ms-client-request-id : dfsdfdfdsfdff
CommandName : Get-AzAppConfigurationKeyValue
FullCommandName : Get-AzAppConfigurationKeyValue_Get
ParameterSetName : __AllParameterSets
User-Agent : AzurePowershell/v0.0.0,PSVersion/v7.4.4,Az.AppConfigurationdata/1.3.2
Body:
....
BeforeCall:
Finally:
Finally:
[CmdletProcessRecordAsyncEnd]: Finish HTTP process
CmdletProcessRecordAsyncEnd:
[CmdletException]: Received Exception with message 'NotSupportedException - The 'file' scheme is not supported. : at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next)
at Microsoft.Azure.Commands.Common.ContextAdapter.AuthenticationHelper(IAzureContext context, String endpointResourceIdKey, String endpointSuffixKey, HttpRequestMessage request, CancellationToken cancelToken, Action cancelAction, Func`4 signal, Func`5 next, Func`6 tokenAudienceConverter)
at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass10_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass9_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.onOk(HttpResponseMessage responseMessage, Task`1 response)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues(String syncToken, String acceptDatetime, String key, String label, String after, List`1 Select, String endpoint, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()'
CmdletException: NotSupportedException - The 'file' scheme is not supported. : at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next)
at Microsoft.Azure.Commands.Common.ContextAdapter.AuthenticationHelper(IAzureContext context, String endpointResourceIdKey, String endpointSuffixKey, HttpRequestMessage request, CancellationToken cancelToken, Action cancelAction, Func`4 signal, Func`5 next, Func`6 tokenAudienceConverter)
at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass10_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass9_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.onOk(HttpResponseMessage responseMessage, Task`1 response)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues(String syncToken, String acceptDatetime, String key, String label, String after, List`1 Select, String endpoint, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()
Get-AzAppConfigurationKeyValue_Get: /usr/local/share/powershell/Modules/Az.AppConfiguration/1.3.2/AppConfigurationData.Autorest/exports/ProxyCmdletDefinitions.ps1:1771:9
Line |
1771 | $steppablePipeline.Begin($PSCmdlet)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The 'file' scheme is not supported.
CmdletProcessRecordEnd:
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 7.4.4
PSEdition Core
GitCommitId 7.4.4
OS Debian GNU/Linux 12 (bookworm)
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```
### Module versions
```PowerShell
oduleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 3.0.4 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 1.3.2 Az.AppConfiguration {Clear-AzAppConfigurationDeletedStore, Get-AzAppConfigurationDeletedStore, Get-AzAppConfigurationKey, Get-AzAppConfigurationKeyValue…}
Script 6.1.0 Az.KeyVault {Add-AzKeyVaultCertificate, Add-AzKeyVaultCertificateContact, Add-AzKeyVaultKey, Add-AzKeyVaultManagedStorageAccount…}
```
### Error output
```PowerShell
DEBUG: 7:16:49 PM - [ConfigManager] Got [False] from [DisplaySecretsWarning], Module = [], Cmdlet = [].
DEBUG: 7:16:49 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 7:16:49 PM - using account id 'avernigora@xxx.com'...
DEBUG: 7:16:49 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 7:16:49 PM - [ConfigManager] Got [False] from [DisplaySecretsWarning], Module = [], Cmdlet = [].
HistoryId: 32
Message : The 'file' scheme is not supported.
StackTrace : at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource
pendingRequestsCts, CancellationToken originalCancellationToken)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next)
at Microsoft.Azure.Commands.Common.ContextAdapter.AuthenticationHelper(IAzureContext context, String endpointResourceIdKey, String endpointSuffixKey, HttpRequestMessage request, CancellationToken
cancelToken, Action cancelAction, Func`4 signal, Func`5 next, Func`6 tokenAudienceConverter)
at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass10_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass9_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.onOk(HttpResponseMessage responseMessage, Task`1 response)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues(String syncToken, String acceptDatetime, String key, String label, String after, List`1 Select, String
endpoint, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()
at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()
Exception : System.NotSupportedException
InvocationInfo : {Get-AzAppConfigurationKeyValue_Get}
Line : $steppablePipeline.Begin($PSCmdlet)
Position : At /usr/local/share/powershell/Modules/Az.AppConfiguration/1.3.2/AppConfigurationData.Autorest/exports/ProxyCmdletDefinitions.ps1:1771 char:9
+ $steppablePipeline.Begin($PSCmdlet)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 32
DEBUG: 7:16:49 PM - [ConfigManager] Got [False] from [DisplaySecretsWarning], Module = [], Cmdlet = [].
```
Contributor guide
Research direction
Start with the Get-AzAppConfigurationKeyValue pagination path shown in AppConfigurationData.Autorest/exports/ProxyCmdletDefinitions.ps1 around line 1771, then trace GetKeyValues and its handling of @nextLink. Reproduce the command against a store with multiple pages and verify that the follow-up request retains the HTTPS endpoint instead of becoming file:///kv and that all key values are returned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100