Skip to main content

Notifications

Community site session details

Community site session details

Session Id : URlnDn3+0Di92CBE51eEKQ
Copilot Studio - Building Copilot Studio Chatbo...
Answered

Set access permissioning and display a message for the user

Like (0) ShareShare
ReportReport
Posted on 13 May 2022 12:30:21 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
    31,397 Most Valuable Professional on 17 May 2022 at 11:21:56
    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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,338 Most Valuable Professional

Leaderboard

Featured topics

Loading started
Loading complete