Forums

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

Error "You were not able to be authenticated using SPNEGO"

Hissam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 11, 2022

Hi Team,

I'm using jira-rest-java-client-api version 5.2.2 to connect to mycompany.com/jira/rest/api/2 using AnonymousAuthenticationHander() as it internally picks up the kerberos session tokens for login, however, I'm ending with 401 status error with the following error description

"You were not able to be authenticated using SPNEGO"

//CODE

JiraRestClient getClient(String url){
return new AsynchronousJiraRestClientFactory().createWithAuthencationHandler(URI.create(url),new AnonymousAuthenticationHandler())
}

void createIssue()throws Exception{
JiraClient client=getClient(url);

//this breaks with 401

client.getIssueClient().getIssue("AlreadyCreatedIssueId").get();

//Also, this breaks with 401
client.GetIssueClient().creatIssue(new IssueBuilder("PROJECT_KEY","ISSUE_TYPE","SOME_SUMMARY")).claim.getKey();



I'm not sure, what I need to do here, as I can access JIRA board using browser/spengo

Please help

0 answers

Suggest an answer

Log in or Sign up to answer