RDNG mass user provisioning scripts
Currently we are on 6.0.1 version and I would like to know is there a way to provision multiple users to work areas using scripts. It will help to automate user provisioning and help support team on user provisioning requests. I am looking something like multiple users can be added to excel spreadsheet with role permission details and script can be run to provision users. Here is article that has batch file script. https://jazz.net/library/article/633 When updated script and executed, able to authenticate successfully but fails to add members to work area. It doesn't give much details in log except saying "Adding members"
Log file shows.
|
One answer
There appears to be a typo in the sample script. If your script just stops at the last line that you posted, it should sort of prove it.
There is an extra space in the code "^ > >> %POST_BODY_FILE%". It should have been "^> >> %POST_BODY_FILE%" - there should be no space between the first caret symbol (^) and the first right angle bracket (>).
You can see this combination "^>" (and "^<") appearing many times in the script. It is to "escape" the angle brackets (<) and (>) so that they can be "echoed" into the file %POST_BODY_FILE%.
Check your script carefully if any such extra spaces exist. If so, remove them. Then run the script again.
Comments
Rakesh Ramgounda
commented Jun 15 '16, 8:26 a.m.
Thank you Donald, That's it, the extra space between first caret symbol (^) and the first right angle bracket (>) resolved script error. However, I am having trouble with csv file. We have ID such as example "rr1568" RAMGOUNDA, RAKESH. When I add ID in first column such as rr1568, log says user added to workarea but when I check I do not see any user added. When I try to add by name RAMGOUNDA, RAKESH, it gives following message "curl: <6> Could not resolve host: RAKESH I tried adding % where is space between my last name and first name and in double quotes, still gets same message. Please advise
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
It uses cURL, just like a mini browser. You need to check the response to find out why the POST operation fails. Remove the "echo off" at the top of the script so that cURL will output the response in the console.
Thanks Donald for response. I did remove echo off and able to get couple of extra message after Add members in log file.
C:\1-SRE\RDNG\script>echo Adding members...
Adding members...
C:\1-SRE\RDNG\script>setlocal enabledelayedexpansion
C:\1-SRE\RDNG\script> echo ^<jp06:members xmlns:jp06="https://jazz.net/xmlns/prod/jazz/process/0.6/"^ > >> postBody.xml
I do have admin rights in work area.
Thanks Donald for response. I did remove echo off and able to get couple of extra message after Add members in log file.
C:\1-SRE\RDNG\script>echo Adding members...
Adding members...
C:\1-SRE\RDNG\script>setlocal enabledelayedexpansion
C:\1-SRE\RDNG\script> echo ^<jp06:members xmlns:jp06="https://jazz.net/xmlns/prod/jazz/process/0.6/"^ > >> postBody.xml
I do have admin rights in work area.