Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Singular Service Account & API Token to Perform JSM REST API Calls

Katelyn Carriker September 4, 2024

I’m working on a Jira Service Management (JSM) project where we need to create tickets via API, and we’re facing an issue that I hope some of you have be familiar with.

Current Situation:

We have a single service account and an associated API token, which we're using to make API calls for creating and updating tickets in JSM. However, all tickets created through the API are displaying the service account as the user, rather than the actual end user. We need the tickets to display the name of the end user who submitted the form, not the service account the API token is tied to.

Test Scenarios:

Here are the test scenarios we’re working with:

  1. A new customer submits a ticket via our custom form (using API calls).

  2. Existing customers submit and update tickets via the same form.

  3. We want to ensure automated notifications are sent when customers reply to the tickets.

Question:

Is there a way to configure our REST API calls (using the service account and token) to reflect the actual end user on the ticket, rather than the service account?

I've read that OAuth 2.0 might allow us to act on behalf of individual users, but I’m not sure how to integrate that, or if it’s the best route for us.

1 answer

0 votes
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 4, 2024

@Katelyn Carriker ,

Not sure which API call you're doing, but if you use the JSM REST API Call: The Jira Service Management Cloud REST API (atlassian.com)

You will able to send the actual end user as reporter just passing your 'email' in the field: raiseOnBehalfOf which simulate JSM portal interface.

Your payload should be like this: "raiseOnBehalfOf": "user-email"

It is important to ensure that this end user is already a customer of your project and has an account associated with your organization.

If you can't guarantee this, I suggest keeping the Service Account creating the tickets and collecting the 'email' of that end user in some additional custom field, just to avoid the risk of the request not being processed by the API.

Let us know if you have any questions.

Katelyn Carriker September 6, 2024

One of our use cases for this API is to create and allow users to submit tickets who are not already a customer in the JSM project.

We are using the JSM REST API calls. 

We have attempted to use the raiseOnBehalfOf, however we see errors returned based off permissions/access.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events