dynamics-crmpowerappscommon-data-service

How to filter data in CDS(powerapps) to restrict unauthorized users


I have created a custom entity in common data services(CDS) that streams in data from a survey.

I'll however need to give access to the data to various people. In my dataset, I have a column called community, which should represent which people have access to what data based on the community they've entered the column.

How exactly can I filter the data, after it has streamed in to ensure I only give access to people of a particular community. And yes every community is exclusive, no two people can be in two different communities.

I want to filter by the community, such that those in community A see only A and not B or C.


Solution

  • There’s no straight one step OOB configuration to achieve this. Because the row level security depends on the column value ie. community field value of each record.

    One way is to create owner teams and add the users to right teams, then the custom entity record has to be owned by respective team - owner team of each custom entity record can be filled/assigned automatically based on the community field value on create using plugin/workflow/Flow.

    Most important, in security role for that custom entity - read privilege has to be given only for user level. Assign the security role to Teams.