Skip to main content

Generate roles from identity data

Role automation

Generate repeatable role structures from source data, preview the impact, and apply the result to the development role model.

Role generators use two filters: one determines which roles exist; the other determines the accounts assigned to each role. Applying a generator manually updates the development role model. A role-generator scheduler task can also apply the result to the active model. Target memberships change later when the active model is executed in a job.

At a glanceDirect link to At a glance

This example generates employee roles by location and links them to existing Active Directory groups. A location such as Oregon produces the role Oregon_Employees, linked to the group Oregon - Employees. A parameterized member filter selects the AD accounts for that location.

InputPurposeExample name
Role generation filterSupplies role names, source locations, and matching target groups.RoleGen_Employee_Location_Groups
Role member filterReturns the target accounts for the location passed by the generator.Employees_AD_Users_P_Location_Members

Use the same pattern for students, departments, titles, or another source attribute. Replace the example names, tables, and fields with those in your environment. In the member-filter name, P indicates that the filter uses a parameter.

Before you beginDirect link to Before you begin

  • Confirm the source location data is available and source identities are related to their AD user accounts.
  • Ensure the target groups already exist and are collected in NIM. Use mappings to provision missing groups; a role generator associates groups with roles.
  • Have a development role model available. Edit the existing development model, or create one if none exists.
  • Review the model's scope and safety guidelines. Do not manage the same group's membership through both mappings and roles.

Build a role generatorDirect link to Build a role generator

Generate roles

Create the role generation filterDirect link to Create the role generation filter

  1. Go to Processing > Filters and create a filter named RoleGen_Employee_Location_Groups.
  2. Start with the source table containing the location information. Include the source location column, such as LocationName, so it is available to pass to the member filter later.
  3. On Columns specification, select Add script column and name it cf_RoleName.
  4. Use the Table data pane to insert the location field into the JavaScript code, then append the user type. For the source tables shown in this example:
return data['Locations']['LocationName'] + '_Employees';

  1. Select Save and Close, then Filter. Confirm the generated role names, such as Oregon_Employees and Washington_Employees, contain no spaces. Use underscores in role and generator names.
  2. Add a second script column named cf_GroupName. Return the exact name of the group in the target system:
return data['Locations']['LocationName'] + ' - Employees';
  1. Select Save and Close, then Filter again. Confirm cf_GroupName matches the existing group names, including spaces and punctuation. In this example, Oregon_Employees is the role name and Oregon - Employees is the group name.
Step 1 of 5
info

Applying a role generator manually updates the development role model only. It does not write changes to target systems. A scheduled role-generator task has separate development and active model options.

Activate and automate the role modelDirect link to Activate and automate the role model

After reviewing the development model, go to Output > Roles and select Activate Development Role Model (the orange play button), then confirm. Activation makes the model available to the next job that processes it.

The job must include a groupmembership operation for the target system. On its next execution, NIM processes the active model and adds or removes memberships according to the role filters and configured scope. See Use roles in jobs.

To maintain generated roles and their group assignments as locations are added or removed, configure a role-generator scheduler task. Choose whether it updates the development model, the active model, or both, and set guard limits before enabling recurring execution. Membership changes still require the job's groupmembership operation.

Edit or remove a generatorDirect link to Edit or remove a generator

Select Edit Role Generator to adjust the filters or settings. Select Remove Role Generator and confirm to delete one that is no longer needed. For a complete worked example, see the Role model tutorial.