Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA Rest API returns 401 unauthorized for non site-admins users

Arthur Hovhannisyan April 22, 2019

Hello, 

I've been trying few days to understand what I'm doing wrong, but unfortunately I want to confirm that I have problems to make API calls for non site-admins users. Two weeks ago it works perfectly, but starting from last week only site-admins users can make API calls. It concern to all operations from JIRA Rest API operations list. It always returns me 401 error. Here is an example of my request header with authorization:

JiraRequest.Headers.Add("Authorization", "Basic " + settings.Credentials());

 where settings.Credential is:

Convert.ToBase64String(UTF8Encoding.UTF8.GetBytes(string.Format("{0}:{1}", user, token)))

Can you please advice what should I do to make it works?

Thanks,

Arthur 

1 answer

1 accepted

1 vote
Answer accepted
Tom Lister
Community Champion
April 22, 2019

Hi @Arthur Hovhannisyan 

My first step would be to check if the unauthorised users are able to access similar function via Jira itself. If not the issue is with Jira users and permissions settings. REST reflects jira permissions and does not have its own set of aurhorisation rules.

Regards

Tom

Arthur Hovhannisyan April 22, 2019

Thank you very much for response @Tom Lister . 

These users can get the issues via Jira website, but through API I get an 401 error. It worked 2 weeks ago, but now only users from site-admins group can get the issues. With all other functions in accordance with their permissions we get the same problems.

Tom Lister
Community Champion
April 22, 2019

Hi

There must be something that has been changed in the last two week that causes this.

upgrades, plugins, sso

how and where you are making REST calls.

Are there any clues in the atlassian-jira log files?

Arthur Hovhannisyan April 29, 2019

Thank you very much for your help, this problem was solved by changing user/email authorization to token.

Suggest an answer

Log in or Sign up to answer