Skip to main content


Building Copilot Studio Chatbots in Microsoft T...

Chat bot hyperlink permissions to SharePoint

Posted on by 2

Created and published a chat bot that's been functional for weeks. It's been working until we setup a Teams team channel that has unique permissions to access specific files in a folder: only a few have full control and all else are set to view only. The hyperlinks to SharePoint work fine in testing but break to error 404 in implementing. I've tried adjusting the permissions settings to no avail from anyone with the link to only those with permissions. I've checked many of the permissions and settings and cannot locate why this is breaking outside of testing. I'm assuming it's permissions. Any idea how to proceed forward so the users can access hyperlinks to SharePoint folders and files that have unique permissions?

  • ASI9G Profile Picture
    ASI9G 2 on at
    Re: Chat bot hyperlink permissions to SharePoint

    I appreciate the suggestion, Renato. I tried to follow along, and if I understand your comment well enough, I believe all users should already have the permissions required to view the files and folders. So creating a sharing link or granting access through power automate SharePoint connectors seems to be irrelevant. I'm rather new to this and may be totally wrong. It seems authenticating to "Only for Teams" already pulls the users info to check.
    For more context, everyone in the org is required to be signed in. The folder is a general use folder that most of the org uses and all users have viewing access while a few have full control authorized. My implementation of the hyperlink system was done by simply creating a message in PVA and putting the hyperlink in the message, no connectors needed. I'd prefer to keep with the simplicity of a message that has hyperlinks, but, since implementation of a few users having full control and all others are view only, the links no longer work in implementation while accessing the bot in Chat but still work in the testing environment. If it were a permissions issue and I have "full control" access to the folder (as well as full admin) then my implementation should work in Chat still.
    At this point, I'm also wondering if the issue is accessing the bot through Chat and not in a teams channel... I'd prefer to allow our org to access the bot in Chat rather than through a channel. But now I'm considering just making a channel/tab with the links and just redirecting them to that through the bot.
    I'm wondering if there is something that I need to change in the settings. Per your linked tutorial of pulling user info from their email, I've already setup the authentication for "Only for Teams" and curious if the other options might work better. 
    Checking on settings, everyone in the team is listed as a user/reviewer for the bot. 

    Following your instructions above, I'm not sure how to set the Item ID integer. However link type and link scope are both the same for how the link was inserted into the message initially, so I'm not sure what this would accomplish but to create a power automate flow that grants access that should already be given to the users or a shareable link that is already utilized in the message. 
    I hope this helps to clarify my issue. 

  • renatoromao Profile Picture
    renatoromao 6,762 on at
    Re: Chat bot hyperlink permissions to SharePoint

    Hi @ASI9G ,


    I think during the tests, the bot is getting your current user (like context) and you have control of this library/folder/document.


    You can try this logic below:

    1- Add logic in the PVA by passing the UserId to the flow, like this blog post

    2- Add logic in the cloud flow with a new action 'SharePoint connector >> Create sharing link for a file or folder'

    3- The output from this action, must be returned to the PVA bot as an 'output'

    4- Show this output message in the chatbot to the user conversation, when the user clicks, will grant permissions


    Let me know if you have any problems 🙂


Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

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


WarrenBelz Profile Picture

WarrenBelz 138,006

RandyHayes Profile Picture

RandyHayes 76,308

Pstork1 Profile Picture

Pstork1 63,059


Featured topics