I'm trying to script or automate user creation. In PowerShell I can add customers in Jira, but the step to add them to the desk fails, or rather just doesn't work.Using the following references https://docs.atlassian.com/jira-servicedesk/REST/3.6.2/#servicedeskapi/servicedesk/{serviceDeskId}/customerhttps://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk/#api-rest-servicedeskapi-servicedesk-servicedeskid-customer-postHas anyone managed to get these to work correctly ?
Hello @Robert Nichols
since you are referencing the add customer endpoint, i guess you'd like to add customers, not agents.
To add customers via REST API you actually have to perform two API calls, the first one to create the customer on the site and the second one to actually add the created customer to the service management project.
Create customer:
https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-customer/#api-rest-servicedeskapi-customer-post
Add customer to the JSM project:
https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk/#api-rest-servicedeskapi-servicedesk-servicedeskid-customer-post
In case the user already exists and you need to find their id:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-get
I hope that helps.
Kind regards,Anton
Hi @Robert Nichols
welcome to the Community!
I guess you're talking about JSM Customer and not Agents or licensed users.
You can create them with a Jira Automation Rule.
Thank you, this is how I did this, calling the various Apis.Works well and we use it frequently Regards Rob
Awesome!
I've also found out, that no notification are being sent, when calling those API end points, while inviting customer in the UI does trigger notifications. Could you confirm that behavior on your site?
It looks like you're new here. Sign in or register to get started.