0

This might be a silly question.

I have an azure web app and an azure function app running. Both are written in .net

I want to debug the application in the local visual studio with the configuration values from the Azure portal.

How can I download the azure configuration for the web app service and function to use in local VS? Manually copying takes a lot of time and is error-prone.

Directly copying using advanced editing is not giving configuration in a correct format.

Vish
  • 346
  • 2
  • 13

1 Answers1

0

After a workaround on this, I found a way by exporting app service configuration to app configuration store and then exporting from there to local file.

There is an import/export option in the App configuration store for each app configuration you created.

Goto Import/export , choose your source and target locations and click on apply as shown:

enter image description here

Imported keys and values from Azure App service to app configuration first and then import from app configuration store to local file in json format.

enter image description here

enter image description here

Retrieved key-values to local folder:

enter image description here

You can also use Az CLI command to export configuration from Azure app service.

az appconfig kv export --name <Appconfiguration> --appservice-account <appservice> -d file --path "C:\temp\filename.json" --format json

enter image description here

Alternatively, You can read configuration from the App configuration store by using builder configuration code as detailed in MSDoc.

Jahnavi
  • 3,076
  • 1
  • 3
  • 10
  • Thanks for the response, but in my case, I don't have a separate app configuration store, the configurations are part of the application's (function app's) configuration. – Vish Mar 01 '23 at 17:36
  • You can also import the configuration from the function app directly using the above given command. @Vish – Jahnavi Mar 02 '23 at 03:52