Open Keiyan opened 7 months ago
Hi @Keiyan ,sorry for the issue. We will fix this in the future release. But you can workaround this by this script:
$store = Get-AzAppConfigurationStore -ResourceGroupName $rg -Name $name
$endpoint = $store.Endpoint
$uri = "$endpoint/kv?api-version=1.0"
$keyVaulePairList = @()
while ($true) {
write-Host "Fetching data from $uri"
$response = (Invoke-AzRest -Uri $uri -Method GET).Content | ConvertFrom-Json
$keyVaulePairList += $response.items
$nextLink = $response."@nextLink"
if ($null -eq $nextLink) {
break
}
$uri = $endpoint + $nextLink
}
I had the same problem, here I share a slightly improved simplified version to only obtain the KEY, but you can improve it or extend it to your liking.
$uri = "$Endpoint/kv?api-version=1.0"
$allKeys = New-Object System.Collections.Generic.List[String]
do {
Write-Verbose "Fetching data from $uri"
$response = (Invoke-AzRest -Uri $uri -Method GET).Content | ConvertFrom-Json
foreach ($item in $response.items) {
$allKeys.Add($item.key)
}
$uri = $Endpoint + $response."@nextLink"
} while ($null -ne $response."@nextLink")
Description
When using Get-AzAppConfigurationKeyValue on an AppConfiguration with more than 100 entries, se are met with the following error, which seems to be due to a problem on the NextLink URL : Invalid URI: The format of the URI could not be determined.
All related information lies in attached logs.
Issue script & Debug output
Environment data
Module versions
Error output