AUTHENTICATION_DENIED error when accessing Confluence content via REST API Call

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

A user with the correct permissions and privileges is receiving an AUTHENTICATION_DENIED error code when attempting to access Confluence content via the REST API. The user's credentials are correct and no other permissions issues would account for why this error would appear for the requestor.

Example

Below is a sample request that is sent to retrieve content from Confluence REST API:

curl -v -u admin -X GET "http:<Confluence-Base-URL>/rest/api/content/rest/api/content?type=blogpost&start=0&limit=10&expand=space,history,body.view,metadata.labels" | python -mjson.tool

Here is the response received after supplying the correct credentials

> GET /rest/api/content/rest/api/content?type=blogpost&start=0&limit=10&expand=space,history,body.view,metadata.labels HTTP/1.1
> Host: HOST:PORT
> Authorization: Basic XXXXX
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Server: Apache-Coyote/1.1
< X-Seraph-LoginReason: AUTHENTICATION_DENIED
< WWW-Authenticate: OAuth realm="HOST"
< Content-Type: text/html;charset=utf-8
< Content-Language: en
< Content-Length: 1116
< Date: Wed, 20 Feb 2019 23:07:20 GMT
<
{ [1116 bytes data]
100  1116  100  1116    0     0  13605      0 --:--:-- --:--:-- --:--:-- 13777
* Connection #0 to host localhost left intact

Response

Diagnosis

Environment

  • Confluence

Cause

If a user has previously failed authentication more than the allowed times before the CAPTCHA challenge is triggered, the user may receive the AUTHENTICATION_DENIED error until their Failed Login Count is reset. 

Resolution

  1. From the Confluence UI,  -> User Management
  2. Search for affected user and click on the user name from the search results
  3. From the user profile, review the user profile and note the value for Current Failed Login Count. This value may be greater than your current allowance (see Configuring CAPTCHA for Failed Logins for more info).
  4. If the failed login count is high, you can manually set the failed login count for the user back to zero by clicking Reset Failed Login Count.
  5. Reattempt your call to the REST API


DescriptionAUTHENTICATION_DENIED error when accessing Confluence content via REST API Call
ProductConfluence
Last modified on Feb 20, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.