One Minute Fixes - Can't Call a Flow from a Power App
I have had 5 instances now of App users not having permission to call a flow from a button press. The error states they don't have the 'prvReadWorkflow' permission, which means they don't have permission to call the flow. This was never an issue when the flow wasn't in a solution so it's something to do with their security role.
The reason is because the flow is now stored in a Dataverse table and the user does not have the read permission for the record. The Basic User role should allow them access but for some reason it doesn't. I have also tried to associate the flow to the app but that didn't work.
Fortunately there is an easy fix, you have to share the flow as a 'run-only' users with the apps security group.
If you are sharing with everyone it's a little more complex as there is no option to share a flow with everyone. Luckily there is a way, you have to share the flow record from the Dataverse table with everyone in the environment.
The steps are: (images below as well)
- Go to make.powerapps.com
- Open Advanced Settings
- Click the filter funnel in top right corner
- Select the Process table
- Run Query
- Select the flow
- Click Share from top ribbon
- Click Add User/Team
- Select Look For Team
- Select your Environment group
- Click Select
- Click Add
- Make sure just 'Read' is selected
- Click Share
The flow should now be fully shared with everyone to run from the app.
There is one potential issue, if the user got access to flow url they would be able to see it and the logs. So if the flow is handling sensitive information make sure all the inputs/outputs are encrypted, and as always, never hardcode any passwords/secrets into the flow.
>----------------------------------------------------------------------------------------------------------------------------------------------
This is a series of short blogs designed to help find solutions for random problems before you ask, keep your eyes out for more
l also do long form and broader Power Platform blogs here https://dev.to/wyattdave
Comments
-
One Minute Fixes - Can't Call a Flow from a Power App
@Pstork1 ,
Sorry I read you comment as if you thought this wasn't using solution files. These examples all use connection references, though the issue could be like you said the flows were made outside and moved in (can't say as I don't know for all instances). I would still say this is unexpected behaviour and not a developer training issue, as Microsoft allows adding non Dataverse flows without warning. Additionally auto add new flows to Dataverse is still in preview so some organisations won't activate it (which should also fix issue for all new flows)
-
One Minute Fixes - Can't Call a Flow from a Power App
@wyattdave If the flow or app are created and then added to the solution this will happen. If they are both built originally in the solution file and make use of Connection references and set the Read Only user settings correctly then additional adjustments are not necessary. I do this frequently and do not need to modify permissions or share the flow with other users.
-
One Minute Fixes - Can't Call a Flow from a Power App
Hi @Pstork1 ,
these are solution files, in fact this is the cause of the issue. Moving to solutions moves the flow to a Dataverse table, and for an unknown reason the App user is not getting access to the flow record in that table. The workaround is to go to the flow record and share it directly.
-
One Minute Fixes - Can't Call a Flow from a Power App
A better solution would be to start learning how to use Solution files. Its nice to have the workaround for now, but the real fix is to use solutions and package apps and flows together.
-
*This post is locked for comments