Share via

Sharepoint agent not accessing content from source

Almeida, Alexy 0 Reputation points
2026-05-14T15:48:10.57+00:00

Context

I created an agent inside a SharePoint that contains multiple folders and files. That SharePoint belongs to a project and team I'm working with, but I only have Read permissions. The agent works in a Q&A way: it's instructed to answer questions about the content inside those folders, such as reading documentation, providing insights and information, cross information from multiple files, and so on.

There are two types of users using the agent: people from the project and users not belonging to the project.

Problem

When editing the agent in SharePoint, in Sources tab, users belonging to the project see the message "Preparing..." next to the source folder it's set up to, and users not belonging to the project do not see any message.

This is what happens when using the agent: every user prompts the same phrase about wanting to find a solution to a problem by looking at the documentation.

  • users not belonging the project are able to obtain the same or similar outputs from the agent, it's able to find the documents related to what was prompted and provides accurate information;
  • users belonging to the project are having trouble getting the correct outputs, every time it outputs that it can't find the right documents or can't find any information.

We suspect that the only factor impacting those outputs is the "Preparing..." message, that has been ongoing for several days for users belonging to the project.

How can this be solved? Does it have anything to do with permissions or Microsoft licenses?

Microsoft 365 and Office | SharePoint | For business | Windows

2 answers

Sort by: Most helpful
  1. Alexis-NG 16,710 Reputation points Microsoft External Staff Moderator
    2026-05-14T17:46:09.09+00:00

    Hi Almeida, Alexy,

    This case where those without project permissions get answers while those with permissions do not points to how SharePoint agents retrieve content in combination with permission-based access and indexing.

    Agents in SharePoint return results based on each user’s access to the underlying data. This means different users can receive different answers even when using the same agent and prompt, depending on what content they are allowed to access.

    The "Preparing..." message indicates that the system is still processing or attempting to make the selected SharePoint content available. If this state persists, it may suggest that the content has not been fully indexed or is not yet available for retrieval. When content is not indexed, the agent cannot access it and may return responses indicating that no relevant information can be found.

    In this situation, users without explicit project permissions may still receive results if the content they access is already indexed or broadly available, while users with explicit permissions depend on accurate retrieval within their scoped access. If the indexing or retrieval process is incomplete, the agent may not return results for those users.

    As a first basic step, you can try resetting the .agent file. In SharePoint, agents are stored as .agent files in the Site Assets or Copilots folder.

    Locate the .agent file in your SharePoint library.

    Move the file to a different folder or rename it. This forces SharePoint to re-register the agent and its sources.

    Go back to the agent editor and re-select the source folders. This can help refresh the connection and clear any processing issues.

    Then, please verify if your project users have a "Limited Access" status in the SharePoint "Check Permissions" tool.

    If users are only granted access at a subfolder level without proper access at the site or library level, this can impact how content is discovered and indexed.

    You can try granting the project team Read access at the site level while still maintaining stricter controls at lower levels if needed.

    You can verify this by asking a project user to go to the SharePoint site and search for a unique phrase from one of the documents using the top search bar.

    • If search fails: the issue is related to the SharePoint search index. You should go to Library Settings > Advanced settings > Reindex Document Library.
    • If search works but the agent still fails: the issue is likely related to the agent configuration or how the data source is being processed. In that case, deleting and recreating the agent can help, as it creates a fresh configuration tied to the updated sources.

    For reference:

    Manually request crawling and reindexing of a site, a library or a list - SharePoint in Microsoft 3…

    Semantic indexing for Microsoft 365 Copilot | Microsoft Learn

    Manage access to agents in SharePoint - SharePoint in Microsoft 365 | Microsoft Learn

    If the issue persists, it's best to have your back end logs investigated. The most effective next step is use your admin credentials to submit a support request through the Microsoft 365 Admin Center.

     

    Microsoft also provides customer service phone numbers based on your region. You can find the appropriate contact number here: Customer service phone numbers - Microsoft Support 

    This route ensures that a Microsoft support engineer can initiate a remote session to investigate backend configurations, run advanced diagnostic tools, and, if necessary, escalate the case to specialized teams with access to internal systems and logs. These backend resources are essential for resolving issues that go beyond what’s visible in the user interface.

    As community moderators, we’re here to guide you, but due to privacy and security limitations, we don’t have access to the backend tools required for a full resolution. For this reason, contacting Microsoft Support via the Admin Center is the most secure and efficient way forward.

     

    In case you do not know who is your IT admin, kindly refer to this article: How do I find my Microsoft 365 admin? - Microsoft Support 

     

    I hope this helps you resolve the issue quickly. I’m glad to assist and truly hope the information provided has been useful. Please feel free to reach out anytime if you need further assistance.  

    If you find my post helpful, kindly consider marking it as the accepted answer. Doing so can assist others in the community who may have similar questions in finding solutions more quickly.  

    Thank you for your kindness and contributions to the forum. 


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-05-14T15:48:44.6966667+00:00

    The behavior is consistent with a combination of licensing/billing and permissions on the SharePoint content and the agent’s .agent file.

    Key points from the documented behavior:

    1. Licensing or pay-as-you-go requirement
      • If a user doesn’t have a Microsoft 365 Copilot license or isn’t covered by a pay-as-you-go policy, the SharePoint agent (or SharePoint tool) can fail with authorization issues.
      • The documented error is Forbidden: Authorization Failed - User does not have valid license, and the resolution is to either:
        • Assign a Microsoft 365 Copilot license to the user, or
        • Enable pay-as-you-go and ensure the user is covered by that policy.
      • For users without a Copilot license, access to agents can be controlled via pay-as-you-go billing by assigning a billing policy to a security group and linking that policy to the agent resource. Only users in that security group can access the agents.
    2. Agent access is governed by file and site permissions
      • Agents in SharePoint are represented as .agent files. Permissions on that .agent file determine who can access or edit the agent.
      • Only users who can create or access files on the SharePoint site can create or access agents.
      • Even if a user can open and use the agent, the agent’s responses are filtered by that user’s permissions to the underlying data sources. If a user doesn’t have access to a site or document library referenced by the agent, the agent’s responses for that user won’t include content from those restricted sources.
    3. Content access differences explain different answers
      • When using agents, each user only has access (through the agent) to sites, pages, and documents that are in the agent’s sources and that the user already has permission to.
      • If users not belonging to the project are getting correct answers, they likely have read access to the relevant folders/files and are properly licensed or covered by pay-as-you-go.
      • If project users see “Preparing…” and get “can’t find documents” responses, likely causes are:
        • They don’t have the same permissions to the source folders/files as the other users (for example, different SharePoint group membership or restricted folders), or
        • They aren’t properly licensed for Copilot and aren’t included in the pay-as-you-go security group linked to the agent resource.
    4. How to resolve To resolve the issue, the SharePoint and Microsoft 365 administrators should:
      1. Verify Copilot licensing or pay-as-you-go coverage for the affected project users:
        • Confirm they either have a Microsoft 365 Copilot license, or
        • Are members of the security group assigned to the pay-as-you-go billing policy that is linked to the SharePoint agent resource.
      2. Check permissions on the .agent file and source content:
        • Ensure the project users have at least read access to the .agent file in the SharePoint site.
        • Verify that the project users have read access to all SharePoint sites, document libraries, and folders configured as sources for the agent.
      3. Confirm same-tenant identity and access (if using the SharePoint tool via the agent API):
        • Ensure the users are in the same tenant in both the Foundry environment and Microsoft 365.
        • Ensure user identity (not application-only) is used, as the SharePoint tool requires identity passthrough.

    Once licensing/pay-as-you-go coverage and SharePoint permissions on both the .agent file and the underlying content are aligned for the project users, the agent should be able to access the same documents for them as it does for the other users, and the “Preparing…” state should no longer block effective responses.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.