Forum Discussion
DrueM
Jan 08, 2024Copper Contributor
Function App access restrictions preventing ADO cloud Pipeline to Government tenant from succeeding
Hi there, I'm running into an access restrictions issue with Function App on our Gov tenant thats preventing the deployment from succeeding from our commercial cloud ADO. It seems that A...
Kidd_Ip
Jul 06, 2025MVP
How about this leverage dynamically retrieve the ADO agent's public IP during the pipeline run and temporarily allow it in the Function App's access restrictions:
1. Add a task in your pipeline to get the agent IP:
agentIP=$(curl -s https://api.ipify.org/)
2. Use Azure CLI to add the IP to access restrictions:
az functionapp config access-restriction add \
--resource-group <your-rg> \
--name <your-function-app> \
--rule-name "ADOAgentTempAccess" \
--action Allow \
--ip-address $agentIP \
--priority 200
3. Deploy your Function App.
4. Remove the IP after deployment:
az functionapp config access-restriction remove \
--resource-group <your-rg> \
--name <your-function-app> \
--rule-name "ADOAgentTempAccess"