Curious was this working previously and stopped?
If not, then I think this might be a “vaguely mis-documented” issue…
The Forge Product API docs (https://developer.atlassian.com/platform/forge/product-rest-api-reference/) say:
To call a product REST API using the Authenticated Product Fetch APIs the operation must support OAuth 2 authentication. In the product API documentation, this is shown by the OAuth scopes required field, which documents the required OAuth 2 scope for that operation.
Calling an unsupported operation with asUser() returns a 401 error.
Note, Jira Cloud REST API version 2 is not supported by the forge lint command. Only /rest/api/3 paths are supported.
Cool cool. So we need to make sure the JSM API documentation says whether OAuth 2.0 is supported.
But then the product docs (https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-request/#api-rest-servicedeskapi-request-get) say:
App scope required :
OAuth scopes required :
And clicking on
App scope takes me to a page titled
Scopes for Connect and OAuth 2.0 (3LO) apps which sounds like OAuth 2.0 is supported.
Maybe related issue? Forge app - Accessing Jira Service Management project issue