Auto-enrollment is a crucial feature when building user onboarding, training platforms, or registration workflows in Power Pages. With Power Automate, you can streamline the process by automatically enrolling users into training modules, events, programs, or courses based on user interactions or conditions—without requiring manual intervention.
This guide will walk you through setting up auto-enrollment logic using Power Automate, integrated with Dataverse and surfaced via Power Pages.
What Is Auto-Enrollment?
Auto-enrollment is the automatic assignment of a user to specific training, event, service, or group based on:
- A form submission
- User registration
- Role or metadata condition (e.g., region, department)
- A date or system-triggered event
For example:
A user who signs up as a new employee gets automatically enrolled in a 3-part onboarding training program.
Use Case Scenarios
- Auto-assigning training modules after new user registration
- Enrolling users into courses after successful quiz attempt
- Assigning mandatory training based on user’s department
- Automatically re-enrolling after certification expiry
- Dynamic event scheduling and session booking
Step-by-Step Guide: Auto-Enrollment Using Power Automate
1. Create Dataverse Tables
a. Training Modules Table
- Name (Text)
- Description (Text)
- Active (Yes/No)
b. User Enrollment Table
- User (Lookup to Contact)
- Training Module (Lookup)
- Enrollment Status (Choice: Enrolled, Completed)
- Enrollment Date (Date & Time)
2. Create a Power Automate Flow
Trigger Options:
Choose one depending on your business logic:
- When a record is created (e.g., user registration or contact creation)
- When a form is submitted (via portal or Power Pages)
- Scheduled flow (e.g., assign training every Monday to new users)
- Manually via button or portal action
Sample Trigger:
Dataverse connector → When a row is added to Contact
3. Define Conditions (Optional)
Add a Condition step to filter who should be enrolled:
If Contact.Department equals "Sales"
Then Proceed to Enrollment
Else Do Nothing
You can also evaluate age, region, registration type, etc.
4. Add Training Enrollment Records
Use the Dataverse – Add a new row action to create entries in User Enrollment
table:
Table Name: User Enrollments
Fields:
- User: Dynamic content → Contact ID
- Training Module: Static or dynamic module ID
- Enrollment Date: utcNow()
- Enrollment Status: Enrolled
To assign multiple modules:
- Use an ‘Apply to Each’ loop over a list of module IDs
- Insert a new
User Enrollment
record for each
5. Optional: Send Email Confirmation
Add an Outlook/Mail step to notify the user:
Subject: Welcome to the Training Portal!
Body: Hi [User], you have been enrolled in [Module Name].
Include a portal link to view their modules.
Display Enrollments on the Portal
In Power Pages, you can create a custom list or Liquid template to show active enrollments.
Example using Liquid:
{% assign enrollments = entities.userenrollment | where: "user.id", user.id %}
{% for item in enrollments %}
<div>
<h4>{{ item.trainingmodule.name }}</h4>
<p>Status: {{ item.enrollmentstatus }}</p>
<p>Enrolled On: {{ item.enrollmentdate | date: "%d-%m-%Y" }}</p>
</div>
{% endfor %}
Tips and Advanced Scenarios
Auto-Enroll in Repeating Sessions
Use scheduled flows to re-enroll based on date or expiry.
Use AI to Suggest Training
Trigger enrollment based on sentiment, performance, or keywords (with AI Builder).
Role-Based Enrollment
Check user’s Web Role in Power Pages and tailor enrollment accordingly.
Enroll from External System
Use Power Automate HTTP or custom connector to auto-enroll based on CRM, HR, or external app triggers.
Monitoring and Auditing
- Enable audit logs on the
User Enrollment
table - Create views to track enrollments by date/module
- Use Power BI for enrollment dashboards