@Siegfried Heintze Thanks for reaching out. The same is documented here. When you try to create the Function project make sure to choose the Authorization level as Function
as in step 4 discussed here. You need to make sure that your function first supports the Authorization level as Function
rather than Anonymous. Now you need to redeploy your function app again and follow the same steps again as documented or mentioned in the video.
How to use Visual Studio to Deploy Azure API Management for Azure Function App using Function Key instead of Anonymouse?
I was able to create an Azure Function App in the portal with function key (instead of anonymous mode) and register that with a newly created Azure API Management and successfully test my function app using the nice test feature in the API Management in the portal.azure.com... Yahoo!
Then I discovered this youtube video: Deploy OpenAPI enabled Azure Functions with .NET in Visual Studio | Azure Friday . When I followed along with Justin Yoo and used anonymous mode it (the test with the API Management in the portal) it worked!
Is anonymous mode a good idea for a public Function App in production that reads and writes to a database? I'm thinking no.
So I want to use a function key for the Azure Function App and when I follow along with Scott Hanselman & Justin Yoo and create a function app with a function key (instead of anonymous mode) in Visual Studio and deploy the function App & the API management to Azure, I get access denied when I try to test it using that nice web UI inside API Management inside the portal.
I tried editing the function registration inside the API management to include the function key but no luck....
Can someone please guide me on how to use Visual Studio to deploy an API Management with a Function App using a function key ?
Thanks
Siegfried
Azure API Management
Azure Functions
1 answer
Sort by: Most helpful
-
MayankBargali-MSFT 70,936 Reputation points Moderator
2022-10-26T05:14:30.323+00:00