Hi everyone,
I am developing a Jira Cloud app using Atlassian Connect Spring Boot. I am running an task to upload an attachment to an issue using POST /rest/api/3/issue/{issueIdOrKey}/attachments. upload attachment
The Issue: Previously, I was able to upload attachments using the standard add-on authentication it worked.
However, I am now receiving a 401 Unauthorized error when using authenticatedAs() suddenly from 21-JAN-2026.
Observations:
-
When I explicitly impersonate a user using
authenticatedAs(AtlassianHostUser), the upload works perfectly. -
When I use
authenticatedAs(), the upload fails with 401. -
My app descriptor has the
WRITEscope.
Code Snippet (Failing):
RestTemplate restTemplate = atlassianHostRestClients.authenticatedAs();
// ... POST request to /attachments ...
// Result: 401 Unauthorized
Code Snippet (Working):
AtlassianHost host = atlassianHostRepository.findByClientKey(clientKey).get();
AtlassianHostUser hostUser = AtlassianHostUser.builder(host).withUserAccountId(userAccountId).build();
RestTemplate restTemplate = atlassianHostRestClients.authenticatedAs(hostUser);
// ... POST request to /attachments ...
// Result: 200 OK
Question: Does the “Create Attachment” endpoint related changes by atlassian as i not able to seed any changes in changlog of REST API.
Any insights would be appreciated!