I want to import approximately 350 users into crowd with CSV files.
The problem is, I also have a custom attribute associated with each user.
Originally, I had intended to just use the CSV import process, and then add the attribute using SQL.
HOWEVER, I have no idea how to generate the ID because it is NOT a SQL Sequence, it is a Hibernate value generated by com.atlassian.hibernate.extras.ResettableTableHiLoGenerator.
Any recommendations? seq_userimport perhaps?
Hi Robert,
I usually try to avoid messing with the database as much as possible as this could screw things up pretty bad. When I'm doing bulk stuff in Crowd, I often use the REST api in combination with Postman runners.
For adding an attribute you could use a POST call to /rest/usermanagement/1/user/attribute?username={username} and add the attribute info to the body of that request:
{ "attributes": [ { "name": "invalidPasswordAttempts", "values": [ "0" ] }, { "name": "requiresPasswordChange", "values": [ "false" ] } ] }
Using Postman Runner you can use a csv as input and easily add attributes for hunderds of users.
Hope this helps.
Best,
Maarten
Regrettably, the way our environment is configured prevents me from using the Crowd REST API. I do not control the configuration, InfoSec does.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Robert,
Maarten's suggestion is definitely the approach I'd take, however if infosec have blocked REST API, then this isn't an option.
I doubt infosec would be very happy with direct DB changes if they don't even like you using the API. Maybe worth discussing with infosec if you can get a temporary exemption while you setup the accounts?
Otherwise, you might be able to automate the attribute population via a record/playback tool - something like Microsoft Power Automate Desktop or Selenium and automate the steps you'd be doing manually
CCM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the record, I generated SQL INSERT statements with the ID being MAX(ID)+1.
This worked in theory (the SQL executed without errors) but it broke the applications Add User feature. I assume the built in counter collided with my numbers, which seems reasonable.
However, since the built in counter only INCREMENTS, I was able to add my attributes using MIN(ID) -1. And that seems to have worked, at least so far.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.