Hi everyone,
I’m building a Forge app for Jira Service Management and ran into a confusing issue around customer provisioning.
Our use case:
We are doing this from a Forge backend resolver using api.asApp().requestJira(...).
Example create call:
import api, { route } from '@forge/api';
const res = await api.asApp().requestJira(
route`/rest/servicedeskapi/customer`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-ExperimentalApi': 'opt-in'
},
body: JSON.stringify({
email,
displayName
})
}
);Manifest scopes include:
permissions:
scopes:
- read:jira-work
- read:jira-user
- read:servicedesk-request
- write:jira-work
- manage:servicedesk-customer
- manage:jira-project
- storage:appWhat works:
api.asApp().requestJira(...) works for other Jira and JSM endpoints/rest/api/3/user/searchWhat fails:
POST /rest/servicedeskapi/customer{
"errorMessage": "Insufficient permission to perform requested action, JIRA Administrators global permission is required.",
"i18nErrorMessage": {
"i18nKey": "sd.rest.error.permission",
"parameters": ["JIRA Administrators global permission"]
}
}We also observed similar issues with:
POST /rest/servicedeskapi/servicedesk/{serviceDeskId}/customerTunnel / runtime facts:
api.asApp()What confuses me:
asApp() with JSM customer APIsX-ExperimentalApi: opt-in is setQuestions:
POST /rest/servicedeskapi/customer actually supported for Forge apps today?manage:servicedesk-customer?For context, we already replaced the unreliable service desk customer listing API with reading the Service Desk Customers role via /rest/api/3/project/{projectKey}/role/{roleId}, and that part works fine. The blocker is specifically customer creation / assignment.
Any clarification would be really appreciated, especially if docs/examples are outdated or if this endpoint is intentionally unavailable to Forge apps.
Thanks and best regards
Peter
Hello @Peter Reiser
POST /rest/servicedeskapi/customer is documented for Jira Service Management Cloud, and the required Forge/OAuth scope is indeed manage:servicedesk-customer. But the same endpoint also explicitly requires Jira Administrator global permission. Those two things are separate: the scope allows the app to request the operation, but it does not remove the endpoint’s own permission check.
That also explains why your logged-in admin user does not help here. Because you are calling api.asApp(), the request runs as the app identity, not as the human opening the UI. Forge’s own docs make that distinction pretty clearly for asApp.
So the error message actually makes sense For me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.