Has anyone successfully imported users to the Remote Control Server with a custom Users Group assigned? We are able to assign several properties from the Users table but when we add the Users_Group.Name, the user isn’t added to the group. If we add a new group to the CSV, it does create the group but does not add the user to the group. Each attempt only adds the user to the DefaultGroup.
In order to map a user to a group you need to re-create the pairs in the GROUP_MEMBERS table.
The problem is that this table contains a user key and a group key which are only available after the import of the users and the creation of a group.
In order to create a group you can add a column to the csv with the name of the group and in the template create an association with such column and the NAME column in the USER_GROUP table.
You can proceed like this:
Import the CSV (all users and groups will be created)
Export to CSV the just imported users from the “All users” page (the CSV will contain a USERKEY for each user)
Edit the exported CSV and add a column for each user to specify the group key (taken from the USER_GROUP table)
Create a template which maps just the USERKEY and GROUPKEY column in the table to the related column in the GROUP_MEMBERS table.
Import the edited CSV by selecting the new created template
So you basically need to do this in two steps and you still need to manually add the group key to each row of the CSV but it should work.
Thank you Federico. I will give this a shot. I will need to perform a VLOOKUP of the exported CSV to modify the original CSV since we have various groups as well as some users already created but this makes sense.
One more question, is there a way to assign multiple groups at once? Can we do this with a separator or add additional columns which also map to the GROUPKEY?
I created a new template and tested the CSV in multiple ways but continue to get errors. My User Template works fine but not the newly created Group Members Template. I originally created the CSV and Template with all columns from the original import but only mapped the USERKEY and GROUPKEY. This failed. I then created a CSV and Template with only two columns but it continues to fail. Below are the test results.
Test Results
Checking template name [Group Members Template] using file [GroupMembers.csv]
Found UTF-8 BOM marker on header
Header matches
Using encoding [UTF-8] from file BOM marker
Using delimiter [']
Template column count [2] does not match file line [2]. Number of columns [1]
Columns identified were:
Column [0] Value [11,7]
Rows tested [2]
GROUP_MEMBERS.USERKEY GROUP_MEMBERS.GROUPKEY
Test complete
Never mind, the delimiter was set to another character instead of a comma. It looked like a comma at first but when I saw both templates in the list, I noticed it was slightly different. I guess I have to keep this in mind when creating new templates as the delimiter may need to be updated.
I tested the CSV and it displayed the USERKEY and GROUPKEY correctly. However, when I tried to process the import, the changes do not take effect. I have tried with “Create Users” set to true or false.