Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get UserId in Confluence

ODW SW Account July 25, 2017

I'm trying to use CLI to disable bulk users use below command:

./confluence.sh --action runFromCsv --common "--action removeUserFromGroup" --file /home/lcong/Desktop/1.csv --server http://confluence.com.cn --user user1 --password ***

# cat 1.csv

userId,group
user1,test

Whant I'm understanding is that the userId is the username, and I can got the username list user --action getUserList command. But when I doing disable action, it says 

Client error: No user with id 'user1'.

 

I also tried other users are got the same error, anyone can help to give some advice? Is the username not userId?  

 

Thanks.  

1 answer

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 26, 2017

From the looks of the examples from Bob Swift's site, the userId is the username:

--action removeUserFromGroup --userId "testuser3" --group "testgroup2"

If you run the action without the file do you still get the error? (I am suggesting this for troubleshooting, not as a resolution. I understand we need to be able to bulk update via the csv.)

ODW SW Account July 27, 2017

Hi Ann, 

Yes, still get the same error, from the Examples from Bob Swift's site the userId seems is the username, and I'm able to run bellow command to get all the user list, so I'm not sure why it is keep saying no user with the listed userID. 

{code} 

--action getUserList 

{code}

{code}

./confluence.sh --action removeUserFromGroup --userId "syiyi" --group "confluence-users" --server http://confluence.com.cn --user admin --password ***

{code}

Output:

{code}

Client error: No user with id 'syiyi'.

{code}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events