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

Add Atlassian Accounts as customers to an organization

Carsten Ranfeld
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 3, 2024

Hello,

reading a lot of documentation and trial&error sessions within a sandbox instance did help to get an answer to the following question:

 

I'd like to add customers to an organization of a service desk using the REST API. Both of the latter are existing or will be created in advance. The customer is given by its email address, which in turn can be (but does not have to) an existing Atlassian account. This fact I don't know in advance. Assignment has to be made arbitrary (no "I create my account myself" allowed). The necessary basic settings are done -

  • enabling "intern" customer access
  • role to "Agent" for product "JSM" of "any domain" in the user access settings

 

I made tests which weird results:

  1. Creation of a (portal-only) customer account using REST API /rest/servicedeskapi/customer -> works as expected
  2. Creation of a customer account (already being an existing Atlassian account) using the same API -> fails with HTTP 400 and error message "... address already assigned to an account"
  3. same action as before with a different Atlassian account -> a portal-only customer account was created

When deleting the resulting account from 3) from the instance and adding the same account to an organization using the UI ("Organization" in the service project settings) it works - the existing account is added to the organization as well as the group jira-servicemanagement-customers-<instance>, the outcome is as expected.

I need a way to find out if the given email address belongs to an existing Atlassian account as to start manual addition procedure or not and then create a portal-only account. If the result of https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-customer/#api-rest-servicedeskapi-customer-post would be always the same and produce an error for existing accounts - I can get along with it. But the experienced behaviour brings trouble and additional steps as aftermath.

 

Has anybody any ideas? Have not found anythink helpful.

Regards,

Carsten

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events