Creating an internal company intranet with role-based content using Power Pages offers a secure, scalable, and customizable solution for sharing information tailored to specific user roles (e.g., HR, Sales, IT, Management). This guide explains the step-by-step implementation using Dataverse, Web Roles, Table Permissions, and Power Pages features.
Step-by-Step Guide: Building a Company Intranet with Role-Based Content in Power Pages
Step 1: Define Your Intranet Content Strategy
Start by organizing the types of content and which roles should access each.
Examples of Role-Based Sections:
- HR: Policies, onboarding, job postings
- IT: Software guides, troubleshooting, request forms
- Sales: Targets, training, lead generation resources
- Management: Reports, strategic updates, internal communications
Define roles such as:
- HR User
- IT User
- Sales Rep
- Manager
- Admin
Step 2: Setup Dataverse Tables
Design a flexible schema to store intranet content and relate it to roles.
Tables to Create:
- IntranetContent
- Title
- Body (HTML/Text)
- File Attachment (optional)
- Published Date
- Category (HR, IT, Sales, etc.)
- Web Role (lookup or option set)
- WebRole (Use existing system table or custom reference if needed)
- User (Contact)
- Use existing portal contact records
- Ensure each contact is associated with a Web Role
- ContentCategory(optional)
- For filtering content by sections/tabs on the intranet
Step 3: Create Web Roles
Navigate to Power Pages Management > Security > Web Roles.
Steps:
- Create a Web Role for each user type: HR User, Sales User, IT User, etc.
- Assign the web role to appropriate contacts manually or via automation
- Ensure “Authenticated Users” web role exists for general access control
Step 4: Set Table Permissions
This ensures that users can only access content appropriate to their role.
Steps:
- Go to Power Pages > Security > Table Permissions
- For
IntranetContent
, set:- Scope: Global
- Permission Type: Read
- Web Role Filter: Select the matching Web Role for each permission set
For example:
- HR User Role → Read permission on content where Category = HR
- Sales User Role → Read permission on content where Category = Sales
This allows filtering visibility by role and content category.
Step 5: Add Role-Sensitive Logic in Web Pages
You can conditionally render sections on the intranet page using Liquid templates.
Example: Show Sales Content to Sales Role
{% if user.roles contains 'Sales User' %}
<h2>Sales Team Resources</h2>
<p>Here is your latest pitch deck and targets.</p>
{% endif %}
Loop Through Role-Based Content:
{% fetchxml roleContent %}
<fetch>
<entity name="intranetcontent">
<attribute name="title" />
<attribute name="body" />
<filter>
<condition attribute="webrole" operator="eq" value="{{user.webroleid}}" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
{% for content in roleContent.results.entities %}
<h3>{{content.title}}</h3>
<div>{{content.body}}</div>
{% endfor %}
Step 6: Create Navigation Based on Role
Modify the navigation menu to show links based on a user’s web role.
Example:
<ul class="nav">
{% if user.roles contains 'HR User' %}
<li><a href="/hr-section">HR Portal</a></li>
{% endif %}
{% if user.roles contains 'Sales User' %}
<li><a href="/sales-section">Sales Hub</a></li>
{% endif %}
</ul>
Step 7: Design the Portal UI
Customize the Power Pages layout using themes, CSS, and sections.
Intranet UI Elements:
- Dashboard: Quick links based on role
- Announcement Banner: Show internal notices
- Quick Search: Search by title/content
- Document Download Section
- Feedback Form (can feed into Dataverse)
Use Bootstrap or custom styles for a responsive layout.
Step 8: Assign Users to Roles
Option 1: Manual Assignment
- Go to Contacts in Dataverse
- Assign Web Role under Portal Contact Details
Option 2: Automate with Power Automate
- When a user signs up or is created in Azure AD
- Evaluate their AD group or job title
- Assign appropriate Web Role automatically
Step 9: Add File Uploads and Downloads
Enable secure file sharing using the Notes/Attachments feature or Azure Blob Storage integration.
- Allow downloads by attaching files to the IntranetContent records
- Use Liquid or JavaScript to display download buttons only to authorized users
Step 10: Testing and Launch
Test Scenarios:
- Login as different users and confirm content visibility
- Check navigation filters
- Validate content downloads
- Test permissions with users outside assigned roles
Use private preview mode in Power Pages to test with dummy data before launch.
Bonus Enhancements
- Announcement Bar: Show internal updates, dismissible alerts
- Search Bar: Keyword search over content
- Calendar Integration: Embed events for HR or company-wide activities
- Analytics Dashboard: Track page visits and most accessed documents
- Multilingual Support: Add content in different languages