Confluence SOAP serivce
Asked by Avinash Singh:

I am trying to use the confluence SOAP service to add users to groups, however when I try to use any method (eg. login method) via the WCF Test client that comes with Visual Studio I get the following errors:![confluence_SOAP.PNG](/t5/image/serverpage/image-id/39620i94C3C3B17DBAF3E3/image-size/large?v=v2&px=999 "confluence_SOAP.PNG")![SOAP_Login.PNG](/t5/image/serverpage/image-id/39621iB98A162B1FA56338/image-size/large?v=v2&px=999 "SOAP_Login.PNG")

{noformat}

The communication object, System.ServiceModel.ChannelFactory\`1\[ConfluenceSoapService\], cannot be used for communication because it is in the Faulted state.

{noformat}

Confluence Version : 6.1.2

I have the SOAP api enabled through the Confluence configuration.


Answers:
author: Stephen Sifers
body: Hello Avinash,

You can enable the SOAP API within Confluence, but you should be aware that the SOAP has has been deprecated since Confluence 5.5. It is suggested to switch to the REST API which is readily available. This may be the result of the errors you are having. Here is a disclaimer from the SOAP API;
> The XML-RPC and SOAP APIs are **deprecated since** **Confluence 5.5**, and may not work as expected.
>
> Confluence has a new [REST API](https://developer.atlassian.com/server/confluence/confluence-server-rest-api) that is progressively replacing our existing APIs. We recommend plugin developers use the new REST APIs where possible.
>
> Note that for Confluence Cloud, [API tokens](https://confluence.atlassian.com/display/Cloud/API+tokens) do not support the XML-RPC and SOAP APIs.

Source document: [Confluence XML-RPC and SOAP APIs](https://developer.atlassian.com/server/confluence/confluence-xml-rpc-and-soap-apis/)

You can find more about the REST API at [Confluence 6.1.2 REST API](https://docs.atlassian.com/atlassian-confluence/6.1.2/). Confluence 6.1 is coming up to end of life support in a few months (as of the date of this post), we would suggest planning an upgrade to a newer version. You can find more about the [Atlassian End Of Life policy](https://confluence.atlassian.com/support/atlassian-support-end-of-life-policy-201851003.html) to see which versions are supported when support ends for those versions.

I hope this helps clarify which API to use with Confluence 6.1.

Regards,  
Stephen Sifers

comments: author: Avinash Singh
body: Thanks Stephen, we will plan an upgrade before the EOL support.

I did take a look at the rest API previously, however the functionality supported is very limited at this point.

I am trying to add users to groups, which doesnt seem to be supported yet.

Regards,

Avinash


author: Stephen Sifers
body: Hello Again Avinash,

You are correct, the API within Confluence does not support user group management. However, the Crowd API does support user management. Crowd is an additional product but would offer user management across the Atlassian tools. I will provide a few links for you to review;

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

[Integrating Crowd with Atlassian Confluence](https://confluence.atlassian.com/crowd/integrating-crowd-with-atlassian-confluence-198573.html)

[Crowd REST APIs](https://developer.atlassian.com/server/crowd/crowd-rest-apis/)

Your best option would be to use Crowd to manage your users as you would be able to control all user accounts from a central tool along with supported API calls to manage users. Another option would be to review the marketplace for add-on which allow for user management via an API or CLI. These marketplace add-ons may be more costly than Crowd and will only offer support within the product you purchase them for (in this case just Confluence). You can find more within the [Atlassian Marketplace](https://marketplace.atlassian.com/search?product=confluence&query=API%20user).

Regards,  
Stephen Sifers


author: Avinash Singh
body: Thank you Stephen.

We have integrated our Atlassian applications such as Jira and Confluence with Okta. This uses Okta's SAML authentication.

On the Jira/Confluence side we still use user directories coming from Active Directory and Jira/Confluence internal directories. The Okta provisioning capabilities and limited at this point, so we are unable to use it yet.

Would you still recommend looking into Crowd ?

Regards,

Avinash


author: Stephen Sifers
body: Hello Avinash,

Okta will be your SAML provider and is compatible with Crowd Datacenter, but not server. In order to get Okta to work with Crowd Server you will require an add-on. You can use [SAML Single Sign On for Crowd](https://marketplace.atlassian.com/apps/1218304/saml-single-sign-on-for-crowd?hosting=server&tab=overview), which will allow Okta to authenticate through to Crowd and then Jira and Confluence. Ensure you test this integration and API calls within your staging instance and not your production instance.

If your end goal is to use an API to edit/change/add users, then moving to Crowd would be the best supported option moving forward.

Regards,  
Stephen Sifers


author: Christian Reichert (resolution)
body: Hi Avinash,

you could also consider looking at our SAML Plugins for the Atlassian Applications. We natively support the OKTA API so that you can proactively synchronize Users and Groups from OKTA in a similar Way that the LDAP synchronization works.

Authentication is then being done via SAML. We also support multiple identity providers at the same time.

<https://marketplace.atlassian.com/vendors/1210947/resolution-reichert-network-solutions-gmbh>

Cheers,

Chris


Tags: atl-dev

confluence-server

soap