How to get function URL without portal

Question

from my previous question on "function doesn't show in portal" (Compiled function not showing in portal) I am now facing the issue that because of that I am unable to use the portal to get the "Function URL" and the function key to auth with. Is there a way to get the function key without access to the portal?

I know that via KUDU I can read the JSON file with the keys, but these are encrypted and I couldn't work out how to decrypt them.

Cheers David

Solution

Try the following ARM API to get the URL and the secret:

post /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/sites/{functionapp}/functions/MyFunction/listsecrets?api-version=2015-08-01

See also PowerShell equivalent here.