- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
I’m currently working on integrating ServiceNow with Jira. I have a requirement to deactivate a user in Jira once they leave the organization. As per Atlassian’s documentation : The Jira Cloud platform REST API I’m following the mentioned steps. However, I’m receiving the following error response:
{ "errorMessages": [ "You are not authenticated. Authentication required to perform this operation." ], "errors": {} }
This occurs even though, in Postman, I receive a message saying “Authentication successful” when I click on Get New Access Token.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17m ago
It turns out that the Basic Auth API key must be generated by an Org Admin, not a regular admin user — otherwise, you’ll encounter an error. The Atlassian team is aware of this bug, but there hasn’t been much progress on fixing it yet.
So, I always recommend generating the token using an Org Admin account. Also, even if the Org Admin user leaves the company later, it does not impact the API key — so you’re safe there and don’t need to worry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Have you tried this operation in Postman and does it work?
If it works in Postman, then you need to check the OAuth configuration in ServiceNow. As per the error message, the authentication information is not included in the REST API call
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Palani,
Thanks for your response.
I’ve tried the operation in Postman itself as mentioned in my post, and it's not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @monica190 ,
The “You are not authenticated” error usually means your access token isn’t being sent correctly in the API request — even if Postman says authentication was successful. You need to ensure the token is included in the actual request header and that you're using the correct API scope and endpoint.
You can double check this
1. Token Format in Authorization Header:-Jira Cloud APIs require Bearer Token authentication. Your request header must look like Authorization: Bearer <access_token>
In Postman:
Go to Authorization tab.
Select Bearer Token.
Paste the token in the field.
Ensure “Add authorization data to” is set to “Request Headers”.
2. Correct API Endpoint:-To deactivate a user, use POST
You’re using the account ID not username or email. The token has access to user management APIs.
3. Required Scopes
Your OAuth token must include the following scopes:
read:me
manage:users
read:users
If you’re using Atlassian’s OAuth 2.0 (3LO), these scopes must be explicitly granted during token generation.
4. Cloud vs Site-Specific API
If you’re using the site-specific REST API (https://.atlassian.net/rest/api/...), it may not support user lifecycle operations. Use the Atlassian Cloud API instead.
Try this from a terminal to verify:
curl -X POST \
url/users<account_id>/manage/lifecycle/disable \
-H "Authorization: Bearer <your_token>" \
-H "Accept: application/json"
If this works, the issue is likely with how Postman or ServiceNow is sending the token.
When calling Jira from ServiceNow:
Use REST Message with OAuth 2.0 profile.
Ensure the profile is linked to the correct token and scopes.
Use setRequestHeader("Authorization", "Bearer " + access_token) if manually scripting.
If it is helpful, please hit the thumbs button and accept the correct solution by referring to this solution in the future it will be helpful to them.
Thanks & Regards,
Mohammed Mustaq Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17m ago
It turns out that the Basic Auth API key must be generated by an Org Admin, not a regular admin user — otherwise, you’ll encounter an error. The Atlassian team is aware of this bug, but there hasn’t been much progress on fixing it yet.
So, I always recommend generating the token using an Org Admin account. Also, even if the Org Admin user leaves the company later, it does not impact the API key — so you’re safe there and don’t need to worry.
