Skip to main content

Notifications

Copilot Studio - Building Copilot Studio Chatbo...
Unanswered

How to debug access to sharepoint files?

(0) ShareShare
ReportReport
Posted on by 9

Hi,

 

I set up an access to a sharepoint directory containing three text files. The security authentication is set to manual and the instructions from here were followed: https://learn.microsoft.com/en-us/microsoft-copilot-studio/configuration-authentication-azure-ad

 

My chatbot doesn't seem to be able to answer any questions related to the contents of these files. If I upload these files directly to the generative ai it works all right. How to debug this issue?

  • IntrepidIbex Profile Picture
    IntrepidIbex 9 on at
    Re: How to debug access to sharepoint files?

    Hi @nesrivastava,

     

    thank you for your elaborate suggestion. I'll try this.

  • nesrivastava Profile Picture
    nesrivastava on at
    Re: How to debug access to sharepoint files?

    @IntrepidIbex .

    There could be multiple potential causes:

    1. The files on SharePoint that are larger than 3MB may not be included in the search results because they exceed the size limit.

    2. The files on SharePoint may not be in the supported formats: docx, doc, pptx, ppt, pdf.

    3. Users may not have permission to access the files on SharePoint. Please check the Graph Explorer to see if the results show up there, as SharePoint uses Graph searches.

    Here is the template for a call to the Graph search:

     

    POST https://graph.microsoft.com/v1.0/search/query 

     

    {
        "requests": [
            {
                "entityTypes": [
                    "driveItem",
                    "listItem"
                ],
                "query": {
                    "queryString": "SEARCH TERMS filetype:docx OR filetype:aspx OR filetype:pptx OR filetype:pdf path:\"DOMAIN.sharepoint.com/sites/SITENAME"
                },
                "from": 0,
                "size": 3,
                "QueryAlterationOptions": {
                    "EnableModification": true,
                    "EnableSuggestion": true
                }
            }
        ]
    }

     

    For example, let’s assume that Generative Answers is configured to provide responses over the following SharePoint site: https://mydoman.sharepoint.com/sites/HR, and users are not getting responses when asking “How many leave days can I accumulate?”. A call to Graph API with the main keywords from the user query could reveal that no results are coming back:

     

     

    {

        "requests": [

            {

                "entityTypes": [

                    "driveItem",

                    "listItem"

                ],

                "query": {

                    "queryString": "accumulate leave days filetype:docx OR filetype:aspx OR filetype:pptx OR filetype:pdf path:\"mydomain.sharepoint.com/sites/HR"

                },

                "from": 0,

                "size": 3,

                "QueryAlterationOptions": {

                    "EnableModification": true,

                    "EnableSuggestion": true

                }

            }

        ]

    }

     

    In this case, we can see that no results are being retrieved from Graph API:

     

     

    {

        "value": [

            {

                "searchTerms": [

                    "accumulate",

                    "leave",

                    "days"

                ],

                "hitsContainers": [

                    {

                        "total": 0,

                        "moreResultsAvailable": false

                    }

                ]

            }

        ],

        "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.searchResponse)"

    }

    If "No" result. Please refer to this doc: Search results missing in SharePoint Online - SharePoint | Microsoft Learn

  • ManikandanS Profile Picture
    ManikandanS 246 on at
    Re: How to debug access to sharepoint files?

    Hello @IntrepidIbex ,

     

    Please check this post below.

    https://powerusers.microsoft.com/t5/Building-Copilot-Studio-Chatbots/PVA-Bot-not-responding-in-Teams/m-p/2607280#M1703

     

    Hope this will solve your issue.

     

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard

Featured topics