Hi everyone
we are developing a PowerApp connected to a dataverse to allow a check during shipments outbound processing. The main requirement from our client is to give access to a specific set of users only to the PowerApp, and not to Dynamics 365 Finance and Operation. A second requirement is to let the PowerApp user print a label, using ZPL code, on a Zebra printer triggering the printing from PowerApp.
To implement this function, we have adopted the following solution:
Data-entities/WHSDocumentRoutingPrinterEntity_IM.xml at master · Ievgenm/Data-entities · GitHub
To let a PowerApp user that is not a D365 user to trigger the flow, we setup a connection using service principal.
With these settings the flow have been working for months.
Now, after a restore of the d365 enviroment, we are experiencing some failures during test.
The flow doesn't work when a user that is not the owner trigger it and the error displayed is the following: "An error has occurred. User is not authorized to read view WHSDocumentRoutingPrinterEntity_IM. Request denied."
We would like to understand how can we deal with this issue.
Thanks,
Flavia
Thanks Skenny! This solved the issue!
1) Remove the PowerApps V1 connector and use the V2 connector for PowerApps instead, update the variables to match in the header.
2) Save the Flow, go to the details pane, in the bottom right you should see a 'Run Only Users' dialog box. Open it, and update the connectors to use the relevant connection reference. Hit Save.
You should be good to run and test.
Is the flow a solution aware flow? In other words was it originally built inside a solution? If it was it should be using connection references. If not then its using direct connections. This kind of problem is common when importing flows into a new environment if they are not solution aware and using connection references. Try adding it to a solution, replacing the connections with connection references that point at the original connection.