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.
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:
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'))
2. An example topic which uses this cloud flow.