Function App Not Retrieving Data from Data Agent After Deployment

Sneha Jagadal 10 Reputation points
2025-05-13T15:50:13.8+00:00

Problem:

The Azure Function App, after being deployed, is unable to retrieve data from the Data Agent configured in Microsoft Fabric. This issue does not occur when running the Function App locally.

 

What Have You Done:

  • Created a Data Agent in Microsoft Fabric.
  • Integrated the Data Agent with an AI Foundry Agent.
  • Verified that the Function App can successfully fetch data from the Data Agent when run locally.
  • Turned on the  Managed Identity to the Function App.
  • Assigned the Managed Identity the Azure AI Developer and Administrator roles.
  • Confirmed that AI Foundry is able to retrieve data from the Data Agent as expected.

What Is Expected:

After deploying the Function App to Azure, it should be able to retrieve data from the Data Agent in the same way it does during local testing. 

 

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
{count} vote

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 17,766 Reputation points Moderator
    2025-05-23T21:54:07.26+00:00

    @Sneha Jagadal When you tested the flow locally, did you use PROJECT_CONNECTION_STRING for connecting the AI foundry agent service with the function app?

    If so, have you created an environment variable with the same name after deploying the Function app to the portal and provided the connection string value? Please refer to this article that guides you how to Add Application settings

    Here is a sample tutorial which explains how to establish a connection with a Function App with AI foundry agent - Use Azure Functions with Azure AI Foundry Agent Service. If you have followed the same process to deploy the function app using azd up command, it will not look for the settings under local.settings.json file and the application settings will note be transferred over.

    Give it a try and let us know if you still experience any issues with receiving data to the Function App.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.