Adding user as project area administrator with API
Jorge Alarcon (41●11●22)
| asked Jun 03 '16, 10:50 p.m.
edited Jun 07 '16, 7:55 a.m. by Paul Slauenwhite (8.4k●1●2)
Hi
I am using REST API to bulk add a user as project member or project area administrator as it says on this library https://jazz.net/library/article/633 It all works fine except when I try to add the user to a project area where the user I am using in to login is not the project area administrator even though I have JazzAdmins and JazzProjectAdmins priviledges doesn't allows me to add the user, however if I go to the web application directly with the same credentials it allows me to add the user. Can you please advice ? Regards |
One answer
As you said it works fine, I guess you have already figured out the mistakes in the sample script in the jazz.net article.
1. The namespace should start with "http", not "https".echo ^<jp06:members xmlns:jp06="https://jazz.net/xmlns/prod/jazz/process/0.6/"^ > >> %POST_BODY_FILE% 2. There is an extra space just before the closing angle bracket. So (^ >) should be (^>). While the script should work for CCM, QM and RM, each application behaves a bit differently. The permission issue that you get could be the result of missing HTTP request header "X-Jazz-CSRF-Prevent". The ccm.log file may give a more accurate indication why the operation fails. It's similar to what's been discussed in the below post. https://jazz.net/forum/questions/63757/programmatically-create-a-project-area-on-rtc-with-curl (See Ruby's answer at the bottom of the post) As far as I can see, RM does not require this HTTP request header for the same operation. Comments
Jorge Alarcon
commented Jun 22 '16, 12:30 p.m.
Hi
Just having JazzAdmins does not automatically grant you all permissions in a project area. You might have to add yourself to the PA administrators and as member to the PA and grant the member a role that has permissions to perform a specific operation. Some, but not all are automatically overwritten if you have JazzAdmin, so you actually can perform the steps above. |
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.