How is the best way to tell if a user is a JSD customer or a Jira user from rest?

rest-api

#1

Hi team,

Is it ok and reliable to test the accountId of the user’s rest responses to tell if a user is a JSD customer or a Jira user?

image

If accountId = null, the user is a JSD customer, otherwise a full Jira user in Cloud with Atlassian credentials. Is there another more reliable way?

Cheers
Fernando


#2

Hi Fernando,

JSD customer accounts will soon also have an accountId value, so checking for null won’t work much longer. What is your use case for needing to know the account type? In general it would be better to rely on application access or a permission check than the type of the account. In case of application access you will group JSD customer accounts and Atlassian accounts without application access on a site in the same bucket, which is in most cases the correct behaviour (most features of JSD treat the two the same).

Regards,
Michael