[BUG] Unable to get the keys of App Configuration
See original GitHub issueLibrary name and version
Azure.ResourceManager.AppConfiguration 1.0.0
Describe the bug
Hello,
I am evaluating Azure.ResourceManager.AppConfiguration to see if I can use it manage a few instances of Azure App Configuration using C#. Basically I need to get the access keys and create/update/delete/get/list key-values.
I was able to create/update/get/delete a key-value without issues however I am unable to get the list of every key-values: calling GetAll
returns a 404.
I tried calling the ‘list endpoint’ manually using the Try it out
button from this page and I also get a 404 error so perhaps the issue is not with the library but with Azure itself.
Expected behavior
The expected behavior is getting the list of key-values.
Actual behavior
A 404 exception is thrown.
Reproduction Steps
You can use the code below to reproduce the issue:
I created a .Net 6 console app (LinqPad) with the Azure.ResourceManager.AppConfiguration@1.0.0
and Azure.Identity@1.7.0
Nuget packages.
var creds2 = ...; // fill in with your usual way to get an identity in a console app, I'm using UsernamePasswordCredential for my tests
var subscriptionName = "...";
var rgName = "...";
var appCfgName = "...";
ArmClient armClient = new ArmClient(creds2);
var subscriptions = armClient.GetSubscriptions();
var subscription = subscriptions.First(x => String.Equals(x.Data.DisplayName, subscriptionName, StringComparison.OrdinalIgnoreCase));
var rg = subscription.GetResourceGroup(rgName).Value;
var store = rg.GetAppConfigurationStore(appCfgName).Value;
var allKeyValues = store.GetAppConfigurationKeyValues().GetAll();
foreach(var kv in allKeyValues) // an exception is thrown with a 404
{
Console.WriteLine(kv.Data.Key);
}
Environment
I’m using LinqPad 7 and I’m targeting .Net 6 on Windows 10.
Output of dotnet --info
:
.NET SDK (reflecting any global.json):
Version: 6.0.401
Commit: 0906eae6f8 Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.401\
global.json file:
Not found
Host:
Version: 6.0.10
Architecture: x64
Commit: 5a400c212a
.NET SDKs installed:
3.1.424 [C:\Program Files\dotnet\sdk]
5.0.203 [C:\Program Files\dotnet\sdk]
5.0.214 [C:\Program Files\dotnet\sdk]
6.0.100 [C:\Program Files\dotnet\sdk]
6.0.110 [C:\Program Files\dotnet\sdk]
6.0.305 [C:\Program Files\dotnet\sdk]
6.0.401 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top GitHub Comments
@orck-adrouin Thanks for getting back. I am glad that the above workaround has unblocked you for the time being. After I did some research on this, I found that the Azure Portal was using the below REST API call underneath to fetch the keys:
I am checking this internally with the product group and I will keep you posted.
Hi @orck-adrouin. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “
/unresolve
” to remove the “issue-addressed” label and continue the conversation.