Import from Confluence / Jira - SSO

Hi All,

We have an instance of Confluence and Jira installed on a third-party cloud. Those instances are using our corporate SSO for login.

I've created a Personal Access Token in Confluence.

I'm trying to import some data from Confluence in our YouTrack instance by using my email address and the token. But, I still get http 401.


Is there anything I'm missing?




I'm Sergey from the YouTrack team. 

This error indicates that the URL is likely correct, but there's an issue with either a username (email) or token. So firstly, please double check that you entered correct data as described in the doc:

If you're sure that everything is correct, please share the following details:

  • a screenshot of the Confluence import settings in YouTrack
  • do you use YouTrack Standalone or YouTrack inCloud? If the former — send the logs and version, if the latter — your instance name

As this is a public forum, you can always contact us directly via or and share the details there.


Thanks Sergey.


My confluence import has the following settings (I can't post it here or anywhere else, for privacy reasons)

URL: the Confluence URL (https://...)

Username or Email: my email address

Password of Token: the token I've generated in Confluence.


I'm using YouTrack standalone (JAR service install on an AWS EC2 instance).

And, I want to mention this again, in case it was missed: my login on Confluence is exclusively done via SSO to my company. 

Here's an excerpt from the import log:

09/06/22 18:32:32,132 ERROR [@tzJobProcessor0] [ImportLogging                 ] [] Script failed with error: Failed to load data from /rest/api/space, response code 401
 Failed to load data from /rest/api/space, response code 401
        at <js> loadJson(093fa1d2-d681-412b-af44-4c25ab94a54d/@jetbrains/youtrack-confluence-client/connection.js:44:1701-1783)
        at <js> getSpaces(093fa1d2-d681-412b-af44-4c25ab94a54d/@jetbrains/youtrack-confluence-client/extractor-spaces.js:30-34:957-1071)
        at <js> getProjects(093fa1d2-d681-412b-af44-4c25ab94a54d/@jetbrains/youtrack-confluence-client/confluence-client.js:74:2722-2748)
        at org.graalvm.polyglot.Value.invokeMember(
        at jetbrains.youtrack.imports.runtime.JsClientAdapter.callOptionalJs(JsClientAdapter.kt:27)
        at jetbrains.youtrack.imports.runtime.JsClientAdapter.callJs(JsClientAdapter.kt:40)
        at jetbrains.youtrack.imports.runtime.JsClientAdapter.getProjects(JsClientAdapter.kt:1041)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(




And, if I browse to <URL>/rest/api/space (in Chrome), I do get a JSON with the data.


Thanks for your response. 

When you browse in Chrome, you don't pass a token with a username as you need to do in the import setting. In general, YouTrack just takes your entered data and sends a request to the Confluence API. 

You can perform a request manually, i.e., via a cURL: 

curl --location --request GET '' \
--header 'Authorization: Basic <emailAddress:token>'
replace yourName with your Confluence instance name. emailAddress:password should be the same as your enter in YouTrack and encoded in base64. 

You can check if the request returns any data.

Hi Sergey,

I'm getting the same http401. 

And, we're not hosting with Atlassian... We are on a separate provider. (Valiantys)


Thanks for your response.

And, we're not hosting with Atlassian.

Well, the API should still be the same, as it's a part of the product. 

I'm getting the same http401

I then recommend reaching our to your provider and clarify why you can't use the API with your credentials. 


Please sign in to leave a comment.