"RetrievePrivilegesForUser, the user with id *** has not been assigned any roles, they need a role with prvReadWorkflow privileges"

107 Views Asked by At

I have this flow which get called from a Canvas app inside a solution inside a dev environment, the flow calls 2 child flows, as follows:

johnjohnPter_0-1710771575823.png

The flow does not have any connection:

johnjohnPter_3-1710771871102.png

Now when some internal users call this flow from PowerApps by clicking on a button which has this formula:

'CreateApprovalItem(Elevated)'.Run(
    4064,
    "PPM-Admins-Test",
    "Work Order"
).response

they get an error

RetrievePrivilegesForUser, the user with id *** has not been assigned any roles, they need a role with prvReadWorkflow privilege".

johnjohnPter_2-1710771718409.png

All external users will get this error:

johnjohnPter_1-1710771688506.png

Any advice? I have other work flow which get called from PowerApps and it is working for all internal and external users, and those flows have connections (unlike the flow which is raising errors), and I am running these flows on elevated privileges using a service account, as follows:

enter image description here

Could the reason be that the workflow which is raising the error does not have any connections?

UPDATE: I added a test action to retrieve some SharePoint items inside the workflow, so the workflow get a connection reference to Sharepoint and I set it to run under the service account, but still I am still getting the same issue/error.

Thanks

0

There are 0 best solutions below