✅ Understanding the Challenge
By default, Dataverse Table Permissions in Power Pages (formerly Power Apps Portals) are based on direct relationships like:
- Contact is the owner of the record.
- Contact is regarding or To on the email.
However, CC recipients are stored in the ActivityParty table, which is a many-to-many relationship and not directly exposed in table permissions.
🛠️ Solution Options
Option 1: Use a Custom Web Role + Web Template
-
Create a custom Web Role for portal users.
-
Create a custom Web Template or Liquid FetchXML that:
- Queries the
ActivityPointer (Email) table.
- Joins with
ActivityParty where ParticipationTypeMask = 3 (which means CC).
- Filters by the current user's contact ID.
Example FetchXML snippet:
<fetch>
<entity name="email">
<attribute name="subject" />
<attribute name="activityid" />
<link-entity name="activityparty" from="activityid" to="activityid" alias="cc">
<filter>
<condition attribute="participationtypemask" operator="eq" value="3" />
<condition attribute="partyid" operator="eq" value="{{ user.contact.id }}" />
</filter>
</link-entity>
</entity>
</fetch>
3.-Display the results in a custom Web Page or Entity List using Liquid.
Option 2: Create a Custom N:N Relationship
If you want to use Entity Permissions instead of custom code:
- Create a custom N:N relationship between Contact and Email.
- Use a plugin or Power Automate flow to populate this relationship when a contact is added as CC.
- Set up Entity Permissions on this relationship so that portal users can see related emails.
Option 3: Use Power Automate to Copy CC Emails
As a workaround:
- Use a Power Automate flow to create a custom record (e.g.,
ContactEmailAccess) whenever a contact is CC'ed.
- Link it to the email and the contact.
- Use this table to drive permissions and display.
🔐 Security Note
Avoid setting Global permissions unless absolutely necessary. The above approaches ensure least privilege access while still exposing relevant data.
🏷️ Tag me if you have any further questions or if the issue persists.
✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems. ❤️ Give it a Like if you found the approach useful in any way.