Reputation: 3736
I deployed a function app in Azure and on trying to "Code + Test" -> "Test + Run", I only see one key in the key dropdown - default (Function key):
App Keys section looks like below:
On running with this key, I see a 401 unauthorized error:
Shouldn't it show more number of keys in the dropdown? AppSettings contain
AzureWebJobsStorage
FUNCTIONS_EXTENSION_VERSION (~3)
FUNCTIONS_WORKER_RUNTIME
Am I missing something to display master (host) key in the key dropdown?
Upvotes: 5
Views: 3929
Reputation: 198
Probably too late to help, but I just faced the issue and in my situation, the problem came from the virtual network.
In the App Function, go to Configuration and get the storage account name in the AzureWebJobsStorage
setting.
Then go to this Storage Account > Firewalls and virtual networks, and check if it is included in a Virtual Network and a Subnet. If so copy their name somewhere.
Go back to the App Function > Networking > In the "VNet Integration" part, click on "Click here to configure", then add the app function into the same virtual network and subnet than the storage account.
In the App keys blade, the default keys should now be available.
Upvotes: 2
Reputation: 961
Have you redeployed (i.e. deleted and created again) this function app? The best way to resolve this is to RESET/CREATE these keys.
You can also, try to restart the function app or change the value of "AzureWebjobsStorage" to another value( to a different storage) and restart the application.
Important Note: Before implementing these steps please make sure that you update all dependent APIs/Applications which were using these keys as your keys may be changed and dependent application will have to be updated accordingly.
Upvotes: 0