This appears to be straight ahead. The safety is dealt with inside our Dataverse atmosphere, and customers that do not need Learn privilege would simply not see the information, and I may management the appear and feel inside the Canvas app in order that the end result appears to be like good to both person.

The screenshots under present the pattern of how this could appear like to customers with the privilege and with out.

Full Privileged Consumer:

Restricted Privilege Consumer (with No Entry to Venture Members):

Canvas App Dataverse Privilege - Limited Access

This appears to be like good, however sadly this isn’t the tip of the put up. Truly, what ended up occurring is that after I opened up the shape utilizing the much less privileged account, I’d see the next error:

Canvas App Dataverse Privilege - Missing Privilege Exception

The error is smart, you don’t have privilege to see these data. I do know this, however why are you displaying the error message.

So additional evaluation decided that that is the best way that I load up the data into my Canvas App. I can load the data utilizing the Information Supply instantly, in my case Tasks and Venture Members, or we are able to load the data into a neighborhood assortment, after which manipulate the information if wanted and show the information to the person as ProjectsCollection and ProjectMembersCollection. The supply code under, reveals the choice of utilizing a Assortment.

Canvas App Dataverse Privilege - Source Code for Collection

Since we would have liked to govern the information, the second choice made extra sense, however now this error. To resolve this concern we first enabled Formulation-level error administration within the Settings space of the app.

Canvas App Dataverse Privilege - Add Function Level Error Management Feature

Subsequent we have to add code to deal with the error message, in order that we show one thing a bit of cleaner or possibly in no way.

We modified the code to incorporate the IfError operate and present a notification that the person doesn’t have privileges to see the information.

Canvas App Dataverse Privilege - Source Code for Collection with IfError

We have been additionally in a position to conceal the fully from the person by setting the size of show to 1 millisecond.

So, the decision is in case you are utilizing Collections that must retrieve knowledge from an information supply, and your customers won’t have privileges to them, just remember to add error dealing with code to that, since you Canvas app won’t deal with this mechanically.

Including a shoutout to Hardit Bhatia on his weblog article on customized errors in Energy Apps:
How to create custom errors in Power Apps! | Hardit Bhatia: The Power Addict


Please enter your comment!
Please enter your name here