Skip to main content

Notifications

Copilot Studio - Building Copilot Studio Chatbo...
Answered

Set access permissioning and display a message for the user

(0) ShareShare
ReportReport
Posted on by

I am trying to create a flow via power automate

to redirect the user to an specific page but if the

 

user doesn't have permissioning for accessing that page,

the flow should run and display the message for the user

 

in my bot saying that he/she don't have

access permissioning for that page. 

 

Thank you for your attention.

  • Verified answer
    Expiscornovus Profile Picture
    Expiscornovus 31,144 on at
    Re: Set access permissioning and display a message for the user

    Hi @Anonymous,

     

    What type of page is this. Is this by any chance a SharePoint page?

     

    If so, you could use the SharePoint REST API to check the user permissions for the using talking to the bot with the GetUserEffectivePermissions method:

    https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-rest-reference/dn531433(v=office.15)#getusereffectivepermissions-method

     

    Below is an example of that approach.

     

    1. The Cloud flow. It uses the User Id to retrieve the Mail which is used in the Send an HTTP request to SharePoint action.

     

    This expression is used to check if the user has or hasn't got access. Based on the outcome either a message or a link is sent back.

    if(equals(body('Send_an_HTTP_request_to_SharePoint')['high'],'0'), 'You do not have access to this page', variables('Hyperlink'))

     

    getusereffectivepermissions_cloudflow.png

     

    2. An example topic which uses this cloud flow.

     

    getusereffectivepermissions_topic.png

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,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard

Featured topics