Skip to main content

Notifications

Building Copilot Studio Chatbots in Microsoft T...
Unanswered

How to debug access to sharepoint files?

Posted on by 7

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 7 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 238 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.

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,995

#3
Expiscornovus Profile Picture

Expiscornovus 1,708

Leaderboard

Featured topics