Rest Api to add user to group
Asked by Danilo Yasushi Saita:

I can't find any rest api to add an user to a group in Confluence Server 6.5.0.

I looked for it in the Rest Api browser.


Answers:
author: Diego
body: Hello there!

Danilo, as of today we do not have this implemented for Confluence. We have this feature request that tackles exactly this need:

**[CONFSERVER-56205 \| Provide API to add users to groups.](https://jira.atlassian.com/browse/CONFSERVER-56205)**

There are some options to REST API though. One of them is Bob Swift CLI:

**[Bob Swift CLI - Atlassian Marketplace](https://marketplace.atlassian.com/apps/284/confluence-command-line-interface-cli?hosting=cloud&tab=overview)**

With it you can use commands such as:

```
addUserToGroup(String token, String username, String groupname) 
```

The other option is to perform this operation via Crowd:

```
"https://crowd-url/crowd/group/user/direct?groupname=group&username=user"{    "name": "user"}
```

You can check more information on this here:

**[Crowd - Add User As Direct Group Member](https://docs.atlassian.com/atlassian-crowd/3.4.0/REST/#usermanagement/1/group-addUserAsDirectGroupMember)**

Crowd is another Atlassian application that focuses on user management. You can take a look here:

**[Atlassian Crowd](https://www.atlassian.com/software/crowd)**

Looking forward to your reply!

comments: author: Harshit Singhvi
body: [@Diego](/t5/user/viewprofilepage/user-id/1188952)

**[CONFSERVER-56205 \| Provide API to add users to groups.](https://jira.atlassian.com/browse/CONFSERVER-56205?_ga=2.228090909.1263079025.1561368533-100923476.1561368533)**

Can you please let us know the ETA on the above feature.

This is a very important feature which should have been existing since we have moved from Confluence XML-SOAP rpc to REST API

In Confluence XML-SOAP RPC we have functions to add user to group but since its deprecated and replaced by REST API the same should have been present in REST API before deprecating Confluence XML-SOAP RPC

I don't see a reason as why a confluence user should spent extra money for managing users. REST API should be updated with the basic admin operations (Like Update , Delete users , Update , Delete groups)

Please have a look and assist us in having this feature in REST API as early as possible


author: Diego
body: Hello there! Thanks for sharing your questions with us [@Harshit Singhvi](/t5/user/viewprofilepage/user-id/1763653) .

Currently, we do not have a *Roadmap to share* about this feature suggestion. You can take a look at Atlassian's Policy here:
> * ++***[Implementation of New Features Policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html)***++

Let us know your thoughts Harshit!


author: Harshit Singhvi
body: [@Diego](/t5/user/viewprofilepage/user-id/1188952)

Thanks for the information. I understand that we have to follow the policies and bring the above change accordingly.

But shouldn't before deprecating something (XML-SOAP RPC) all the deprecated functions should be implemented in the new REST API architecture ?

Since it seems the above is going to take time can you please provide an example implemented in Java to use Confluence SOAP / XML RPC to add a user to group or any different example which explains the Java implementation of Confluence SOAP / XML RPC ?

Also if you could do anything in pushing the implementation of this feature as early as possible it would be of great help.


author: Harshit Singhvi
body: [@Diego](/t5/user/viewprofilepage/user-id/1188952)

Can you please help with your reply to the above


Tags: api

confluence-server

server