RIO Education License Overview
Table of Contents
Administrators can access the overview of the RIO Education license and features being provisioned to an Salesforce org by navigating to:
- Click on App Switcher
- Search for RIO Education Settings page
In the RIO Education Settings page, the license provisioned and used will be displayed.
Understanding Licenses in RIO Education
In RIO Education, there are three types of licenses:
- Admin
- Faculty
- Student
Licenses are tracked based on whether users are assigned specific Custom Permissions - these are not the same as standard Permission Sets, but they can be included within them.
The custom permissions used for licensing are:
- REDU_Admin
- REDU_Faculty
- REDU_Student
These custom permissions can be assigned to users in two ways:
- Directly through a user’s Profile
- Through a Permission Set that includes the custom permission
How Licensing Is Counted
An active user will count toward a license if they are assigned one of the above custom permissions, whether it comes from their profile or a permission set.
Examples:
- If a user is assigned a profile or permission set that includes REDU_Admin, they use one Admin license.
- If a user is assigned both REDU_Admin and REDU_Faculty, they use one Admin license and one Faculty license.
- A user can consume multiple license types if they have multiple custom permissions.
Key Clarification
While Permission Sets are a way to group access and assign it to users, it is the Custom Permissions (REDU_Admin, REDU_Faculty, REDU_Student) that actually trigger license usage. Think of custom permissions as license flags, and permission sets as containers that might hold those flags.
When do we calculate the license
A scheduled batch job, REDU_License_SCHED, runs every Sunday at midnight to calculate license usage. This information is then reported back to RIO Education's license management portal for reporting purposes.
If you do not see the scheduled job in Salesforce Setup > Environments > Jobs > Scheduled Jobs, it can be reinstated by navigating to the RIO Education Settings app page again as an administrator.
Script For License Count
The following is the script and query that we used to identify the profiles and permission sets that include the custom permission:
//Change the custom permission name here: REDU_Admin, REDU_Faculty, REDU_Student
List<CustomPermission> cpList = [SELECT Id, DeveloperName FROM CustomPermission WHERE DeveloperName = 'REDU_Admin'];
Set<String> permissionSetNames = new Set<String>();
Set<String> profileNames = new Set<String>();
for (SetupEntityAccess sea : [SELECT SetupEntityId, ParentId, Parent.Name, Parent.Profile.Name FROM SetupEntityAccess WHERE SetupEntityType = 'CustomPermission' and SetupEntityId IN: cpList]) {
if (String.isNotBlank(sea.Parent.Profile.Name)) {
profileNames.add(sea.Parent.Profile.Name);
} else {
permissionSetNames.add(sea.Parent.Name);
}
}
System.debug('Profiles :: ' + JSON.serialize(profileNames));
System.debug('Permission Sets :: ' + JSON.serialize(permissionSetNames));
The following is the script and query that we used to count the license usage based on profiles and permission sets:
//Change the custom permission name here: REDU_Admin, REDU_Faculty, REDU_Student
List<CustomPermission> cpList = [SELECT Id, DeveloperName FROM CustomPermission WHERE DeveloperName = 'REDU_Admin'];
Set<Id> permissionSetIds = new Set<Id>();
for (SetupEntityAccess sea : [SELECT SetupEntityId, ParentId FROM SetupEntityAccess WHERE SetupEntityType = 'CustomPermission' and SetupEntityId IN: cpList]) {
permissionSetIds.add(sea.ParentId);
}
Set<Id> userIds = new Set<Id>();
for (PermissionSetAssignment psa : [SELECT AssigneeId
FROM PermissionSetAssignment
WHERE PermissionSetId IN :permissionSetIds
AND Assignee.IsActive = TRUE
]) {
userIds.add(psa.AssigneeId);
}
Integer usersCount = userIds.size();
The following is the script and query that we used to count the license usage based on permission sets only:
//Change the custom permission name here: REDU_Admin, REDU_Faculty, REDU_Student
List<CustomPermission> cpList = [SELECT Id, DeveloperName FROM CustomPermission WHERE DeveloperName = 'REDU_Admin'];
Set<Id> permissionSetIds = new Set<Id>();
for (SetupEntityAccess sea : [SELECT SetupEntityId, ParentId, Parent.ProfileId FROM SetupEntityAccess WHERE SetupEntityType = 'CustomPermission' and SetupEntityId IN: cpList]) {
if (String.isBlank(sea.Parent.ProfileId)){
permissionSetIds.add(sea.ParentId);
}
}
Set<Id> userIds = new Set<Id>();
for (PermissionSetAssignment psa : [SELECT AssigneeId
FROM PermissionSetAssignment
WHERE PermissionSetId IN :permissionSetIds
AND Assignee.IsActive = TRUE
]) {
userIds.add(psa.AssigneeId);
}
Integer usersCount = userIds.size();