Hi everyone,
I’m running into an issue when using the Forge API to query for user details. When I try to get user information using api.asApp(), I get a 404 response.
For example, visiting the following URL in the browser works perfectly and shows the user details I need:
https://atlasteam-showroom.atlassian.net/rest/api/3/user?accountId=workingID
However, when I try to do the same from my Forge app with:
const response = await api.asApp().requestJira(
route`/rest/api/3/user/search?accountId=${encodeURIComponent(accountId)}`
);
I get a 404 Not Found.
I’ve verified that:
-
My app has the correct scopes (
read:jira-user). -
The
accountIdexists and is valid. -
The same request works on another Jira instance.
It seems like the API behaves differently depending on the Jira instance, but I’m not sure why. Has anyone experienced this or knows how to correctly fetch user details from Forge using asApp?
Any guidance would be greatly appreciated!
Thanks in advance.