After Atlassian Accounts is enabled the REST API calls are failing returning 401 Unauthorized if Google apps or SSO are used to log-into the instance.
In the response header you can see:
According to JIRA REST API Example Cookie based Authentication:
When you get an error response from JIRA, you can check for the presence of an X-Seraph-LoginReason header in the response, which will contain more information. A value of AUTHENTICATION_DENIED or AUTHENTICATED_FAILED means the application rejected the login without even checking the password, which most commonly indicates that JIRA's CAPTCHA feature has been triggered.
However, since Google Apps or SSO are used to log-into the instance, the user is never prompted the captcha and therefore the failed passwords attempts counter is never reset.
- Have a JIRA instance already configured to use Google for authentication.
- Enable Atlassian Accounts and verify the email.
- Try to authenticate REST API calls using the credentials that always worked
The correct response or a meaningful error message is returned
You get 401 unauthorized. The response header looks like:
In the logs the below exception can be found:
A) Reset the password for the user in id.atlassian.com by going to:
If this is not applicable because you didn't have a password previously set in id.atlassian.com and therefore you cannot use the change-password form. Then do the following:
- Go to https://id.atlassian.com/login/resetpassword
- Enter you email, complete the CAPTCHA and click on Send
- Once you receive the password reset email, do not click on the button to Access but on the link below that says "reset password".
- Fill up the new password and you are done.
B) Use Cookie-based Authentication.
- If you're on Chrome, you can install an extension called cookies.txt
- Then, log into your instance and click on the extension
- Copy the cookie information (the data shown in the extension) and save it to a text file
- Use the cookie stored in the text file to authenticate REST API calls by using the -b argument in Curl.