Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you read Environment Variables in Debug Azure Function

I am sure I am missing the obvious and getting to grips with Azure functions.

Question

In debug what do I need to set up in order to read the Enviroment variables from keyVault?

It seems to return null in debug? is there a special settings in local.settings.Json?

thanks

like image 843
developer9969 Avatar asked Oct 16 '25 02:10

developer9969


1 Answers

local.settings.json? No, what you should do is put the reference to the configuration settings on azure instead of local.settings.json. And you need to give your function app fully access policy to key vault.

Have a look of this doc:

https://learn.microsoft.com/en-us/azure/app-service/app-service-key-vault-references#granting-your-app-access-to-key-vault

like image 132
Cindy Pau Avatar answered Oct 17 '25 18:10

Cindy Pau