Share via

uploading data in microsoft foundry agent

Akku Reba 0 Reputation points
2026-04-23T02:08:50.27+00:00

I created an agent in the foundry. Now I want to add data into this. For that I tried to create a knowledge source. In that, I created an azure storage account which contains the file. Now when I try to connect this storage source to my agent, it is showing the message as "Failed to create knowledge source Failed to create or update knowledge source". Please let me know what to do as I don't have any prior knowledge to the same and I am from a non-technical background.

Foundry Agent Service
Foundry Agent Service

A fully managed platform in Microsoft Foundry for hosting, scaling, and securing AI agents built with any supported framework or model


3 answers

Sort by: Most helpful
  1. Jerald Felix 11,550 Reputation points Volunteer Moderator
    2026-04-27T02:12:47.4433333+00:00

    Hello Akku Reba,

    Greetings!

    Thanks for raising this question in Q&A forum.

    No worries at all this is a very common issue for people getting started with Microsoft Foundry, and it has nothing to do with your technical background! The "Failed to create knowledge source" error usually happens because a few important setup steps need to be done before connecting your Azure Storage to your Foundry Agent. Think of it like trying to open a locked door you need the right key (permissions) and the door needs to be reachable (network settings). Let me walk you through it step by step in simple language.

    Step 1: Give your Foundry Agent permission to read your storage

    Your Azure Storage account is like a locked cabinet. By default, your Foundry Agent does not have the key to open it. You need to give it permission.

    1. Go to the Azure Portal (portal.azure.com) and open your Storage Account.
    2. On the left side menu, click Access Control (IAM).
    3. Click the + Add button and then click Add role assignment.
    4. In the search box, type Storage Blob Data Reader and select it, then click Next.
    5. Under "Assign access to", choose Managed identity.
    6. Click + Select members, search for your Foundry project name, select it and click Save.

    This gives your Foundry Agent the key it needs to read your files.

    Step 2: Make sure your storage account is not blocked by network settings

    Sometimes storage accounts are set to "private" and only allow certain connections. Let's temporarily open it up to test.

    1. In your Storage Account, click Networking from the left menu.
    2. Under "Public network access", select Enabled from all networks.
    3. Click Save.
    4. Now go back to Microsoft Foundry and try connecting your storage again.

    If this works, your agent can now reach the storage. For long-term use, you or your IT team can set up a more secure connection later.

    Step 3: Make sure your storage is registered as a connection in Foundry first

    This is a step many people miss! You cannot connect storage directly to the agent — you must first add it as a "connection" inside your Foundry project.

    1. Open your Foundry Project.
    2. Go to Settings or Connections (usually found on the left-side menu or under project settings).
    3. Click New connection and choose Azure Blob Storage.
    4. Enter your storage account name and container details, and save it.
    5. Only after this connection is saved, go back to your Agent and try creating the knowledge source using this connection.

    Step 4: Double-check your file details

    Before retrying, also confirm:

    1. Your file is inside a container in the storage account (not just the storage account itself).
    2. The file format is supported — use .pdf, .txt, .docx, or .md files only.
    3. The container name and storage account name are spelled correctly.

    Step 5: Delete the failed knowledge source and try fresh

    After completing all the above steps:

    1. In Foundry, go to your Agent's knowledge sources and delete the failed entry.
    2. Click Create new knowledge source again and start fresh.
    3. This is important because failed entries are not automatically retried — a fresh attempt is always needed after fixing permissions.

    Quick Summary in plain words: You need to (1) give Foundry permission to read your storage, (2) make sure the storage is not blocked by network settings, (3) register the storage as a "connection" in Foundry first, and then (4) create the knowledge source. Following these steps in order should get you working!

    If this answer helps you kindly accept the answer which will help others who have similar questions.

    Best Regards,

    Jerald Felix.

    0 comments No comments

  2. Karnam Venkata Rajeswari 2,390 Reputation points Microsoft External Staff Moderator
    2026-04-26T08:18:28.4166667+00:00

    Hello @Akku Reba ,

    Welcome to Microsoft Q&A .Thank you for reaching out to us.

    The behavior observed during knowledge source creation typically indicates that the agent is unable to fully access or integrate the configured data source due to one or more setup dependencies.

    Please check if the following suggestions help -

    1. Permissions validation - Successful data access depends on correct role assignments across all underlying resources. The platform requires the following permissions to access data or create dependent resources.
      1. Ensure the project identity has appropriate access to storage:
        • Assign Storage Blob Data Reader or higher on the storage account
      2. Verify required roles for overall setup:
        • Azure AI Account Owner - for project creation
        • Role Based Access Control Administrator - to assign roles
        • Azure AI User - to create and manage agents
    2. Network accessibility - Network-restricted environments require explicit configuration to allow secure communication between agent services and storage
      1. Please check if storage or related resources are restricted by firewall rules or virtual networks
      2. Temporarily allow public access for validation purposes
      3. If private networking is enabled, ensure connectivity between all resources within the same network
    3. Storage connection configuration - Please check if the following are properly registered within the project.
      1. Storage accounts are not accessed directly; they must be configured through connections
      2. These connections act as the data access layer used by agents and related features
      3. Ensure the storage connection is created and visible within the project before creating a knowledge source
    4. Knowledge base and search dependency - Knowledge source creation may fail if supporting components are not accessible or fully configured.
      1. Knowledge sources are part of a knowledge base, not standalone entities
      2. Knowledge bases rely on search indexes and associated services for retrieval
      3. Missing or incomplete configuration in this layer can result in generic creation failures
    5. Data and path validation - Please confirm that the input data is correctly structured and accessible.
      1. Verify container name and file availability
      2. Ensure supported file formats are used (.txt, .pdf, .docx, .md)
      3. Confirm correct path selection during knowledge source setup
    6. Retry after configuration updates - After completing all validations
      1. Remove any failed knowledge source entries
      2. Recreate the knowledge source
      3. As configuration updates especially permissions and connections are not always applied retroactively, so a fresh attempt is required.

    The following references might be helpful , please check them out

    Thank you

    0 comments No comments

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

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