HI ,
As I understand in this use case you want only to call the azure functions from azure Devops ?
instead of whitelisting ip adress you can in access restriction in the azure function allow the tag : AzureCloud you can check it from this link :
https://learn.microsoft.com/en-us/azure/virtual-network/service-tags-overview?wt.mc_id=MVP_328341
else
Function Key with IP Whitelisting:
As you mentioned, using a function key along with IP whitelisting is one option. This ensures that only requests with a valid function key and originating from specified IP addresses (you may want to create self hosted agent ) can access your function. While not ideal, it does provide a level of security. API Management: You can set up Azure API Management in front of your Azure Function. API Management can act as a gateway, allowing you to enforce security policies, including authentication, IP filtering, rate limiting, and more. This allows you to use more advanced authentication mechanisms such as OAuth, client certificates, or even Azure AD authentication.
Hope this helps