Web Role vs Table Permissions

Loading

When working with Power Pages (formerly Power Apps Portals), understanding Web Roles and Table Permissions (formerly called Entity Permissions) is crucial for controlling who can access what. These two components work together to define user access, but they serve different purposes and operate at different levels of the portal’s security model.

This guide provides a clear, detailed, side-by-side comparison of Web Roles and Table Permissions, explaining their purpose, differences, how they interact, and best practices—perfect for mastering portal security.


What Are Web Roles?

A Web Role in Power Pages defines who the user is in terms of their identity and classification. It categorizes portal users into groups like Admin, Registered User, Member, Anonymous User, etc.

✔️ Purpose:

To group users and assign security context for access to web pages, table data, forms, lists, and other portal elements.

Example:

  • A user with the “Student” Web Role can access course materials.
  • A user with “Support Agent” Web Role can view and update support tickets.

What Are Table Permissions?

Table Permissions define what data actions a user can perform on Dataverse tables (formerly Common Data Service). These actions include: Read, Create, Update, Delete, Append, and Append To.

Purpose:

To secure Dataverse data and define what actions a user can perform on records.

Example:

  • A user with read permission on the “Job Applications” table can view application records.
  • A user with create/update/delete on the “Support Cases” table can manage customer issues.

Relationship Between Web Roles and Table Permissions

Web Roles grant identity. Table Permissions grant actions.

They work together:

  • You assign Table Permissions to a Web Role, not directly to a user.
  • A user gains permission to a table only when their Web Role includes that permission.

Flow:

  1. User logs in → Identified as a Contact.
  2. Contact is assigned a Web Role.
  3. Web Role includes specific Table Permissions.
  4. User can now interact with data based on those permissions.

Comparison Table: Web Role vs Table Permission

FeatureWeb RoleTable Permission
Primary FunctionDefine user identity/roleDefine data access actions
ScopePortal-wideSpecific to Dataverse tables
Assigned ToContacts (users)Web Roles
Used ForControlling access to:
– Web Pages
– Web Files
– Entity Forms
– Lists
Controlling access to:
– Table records
– Form/List data behavior
Permissions IncludedNone directlyRead, Create, Update, Delete, Append, Append To
Configuration LocationPortal Management App > Web RolesPortal Management App > Table Permissions
Usage Example“Managers” can view HR dashboard“Managers” can view all records in the “Leave Requests” table
Security LayerIdentity-based groupingData-level access
Anonymous UsersYes, Web Role can be set to allow unauthenticated accessLimited (Table permissions usually target authenticated users)

📘 Example Scenario

Scenario:

You have a “Student Portal” where:

  • Only logged-in students can view their enrolled courses.
  • Admins can see all courses.
  • Guests (anonymous) can only view a welcome page.

Setup:

ComponentConfiguration
Web RolesCreate: Student, Admin, Anonymous
Table Permissions– Courses Table:
Student role = Read (Contact scope)
Admin role = Read (Global scope)
Page Permissions– Enrolled Courses page: Accessible to Student and Admin roles
– Welcome page: Open to Anonymous role

Security Best Practices

  1. Never rely solely on Web Roles to secure data. Always use Table Permissions for Dataverse tables.
  2. Use multiple Web Roles when needed – one for authentication, one for data access.
  3. Use scoped permissions (Contact, Parent, Account) to limit data exposure:
    • Contact scope = Users can only access their own records.
    • Global = Users can access all records of that table.
  4. Keep Web Role names intuitive, like HRManager, RegisteredUser, Guest.
  5. Test each role using test users in your staging portal.

When to Use What?

Use CaseUse Web Role?Use Table Permission?
Controlling who can see a web page Yes Not required
Showing/hiding buttons based on role Yes Not required
Controlling who can view records in a table Yes (indirectly) Required
Securing form submissions Yes (for visibility) Yes (for create permission)
Displaying different homepage layout for admins Yes Not required
Allowing only account managers to see related contacts Yes Yes (with Parent scope)

Final Thoughts

  • Web Roles are the identity layer in Power Pages.
  • Table Permissions are the data layer security mechanism.
  • For secure and scalable portals, you must use both in tandem.
  • Think of Web Roles as “who the user is” and Table Permissions as “what they can do with data.”

By combining the two smartly, you can build complex, multi-layered portal security that’s both user-friendly and data-protected.

Leave a Reply

Your email address will not be published. Required fields are marked *