How to Remove Users in Bulk from Groups and Roles

Managing users group and role memberships can be tricky when it needs to be done in bulk. Mass updates to group and role memberships typically is the result of two scenarios: a user left the company and must be removed from all their groups and roles, or a list of user's needs be removed from a select few groups and roles. In this article we will look at how we can leverage the tools in MetaManager™ Security Editor to manage these types of changes to group and role memberships.

Remove a user from all their group and role memberships

If the goal is to only to remove a user from all current group and role memberships this can be the simplest process we will cover. To begin, load in to Security Editor and access the portal tree. We will now need to locate the user that needs to be removed. This can be done by leveraging either the search bar and entering the users name, or by navigating the portal and locating the user. Drag-and-drop the user to the canvas area to the right of the portal tree once they have been located.

We can see Mandy is a member of the six groups shown above. To remove Mandy from these groups, we can select any group in the list, then perform a Ctrl+A to select all of the groups. Once all of the groups in the list have been highlighted we can press the Delete button to remove Mandy from these memberships.

Security Editor can really make the process of removing a user from all their group and role memberships that simple.

Remove multiple users from group and role memberships in bulk

The next use case we will explore will be removing multiple users from multiple groups and roles in bulk. The most efficient way to do this is to leverage the import option to Assign Memberships in Security Editor. This will allow you to edit the group and role memberships in Excel, and then import them back in to Cognos using Security Editor.

To start, we will first need to export the existing group memberships to a CSV file. This can be done by highlighting the groups in the portal tree, right-clicking them, and selecting the Export Memberships option.

Name the file and choose a location on the file system to save it when you are prompted.

We will be looking to remove Allisia and Andy from their group memberships in this example. To begin, we will open the CSV file in Excel. Once the file is open we will want to filter all the columns.

Now we can filter on the users we need to remove. In this case it will be Allisia and Andy.

Once filtered, we can select the rows that belong to Allisia and Andy and delete them from the CSV file.

Remove the filters and the group memberships will no longer include Allisia or Andy. This CSV file will now be used as our import file to reassign the members for the groups we have just edited. Be sure to save the CSV file and close it before attempting the import.

Return to Security Editor in MetaManager™. Below are the current group assignments in Cognos as displayed in Security Editor. We can see Allisia and Andy are still in the groups. To fully remove these users we will import the CSV file that was edited which does not have them as members to these specific groups.

To begin, select the Assign Memberships option from the Security Editor toolbar.

Next, select the CSV file with the updated memberships as the Membership Import File. It is import to select “Replace existing members” under the Import Options section. This will remove all previously existing members and reapply our new memberships from the CSV file. Choosing the Append option will only add members that do not already exist in those groups

Now that the import options are defined we can select OK and run the import..

Refreshing the groups in Security Editor will allow us to confirm the memberships have been updated properly. From the screenshot below we can see that Allisia and Andy have successfully been removed from their group memberships.

Leveraging the import options in Security Editor provides a great deal of flexibility when managing group and role memberships. By using these methods a great deal of time and energy can be saved when needing to make bulk changes to memberships in a Cognos BI environment.