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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Find JIRA user based on user's email address

I need to be able to find a customer by email from JIRA.

We are using /rest/servicedeskapi/customer POST request to create customer and in case we are getting a message that customer already exists, can we get information about the existing customer from Jira?

Any tips or recommendations would be appreciated.

1 answer

1 vote
Andy Heinzer Atlassian Team Feb 11, 2020

Hi Artem,

If I understand your situation here, you're wanting to be able to see if a particular email address already has an account in your Jira Cloud site.  This is not as easy as it used to be when searching by the REST API in Jira Cloud, I believe this is largely due to the GDPR compliance changes.

The answer depends on where you are wanting to look to find this info.  If you are a site-admin, then you should have access to be able to see a list of all the Jira Service desk customer portal only users by going to select the Jira icon (, or ) > People > Manage users > Jira Service Desk.  On this page there is an Export customers button that you can export a list of your users there that also includes their email addresses.

But I imagine you are looking for a means to do this via the REST API. In which case, I'd recommend reviewing our Deprecation notice and migration guide for major changes to Jira Cloud REST APIs to improve user privacy from last year.  Much changed since that time in regards to what data is returned from REST and how.  You could try to use the endpoint GET /rest/api/3/users/search.  Please note that in order to get back useful results, you either need to supply the username or use the query parameter here.  So the call might look like this:

/rest/api/3/user/search?query='user@example.com'

Alternatively could do this using the endpoint of GET /rest/api/3/groupuserpicker.  In this example, you could query for an email address to hit the endpoint of

/rest/api/3/groupuserpicker?query='user@example.com'

In my own testing this can help, but it is not a perfect solution.  Largely because search results are sometimes returning values that might match a username, but not the email domain, or vice versa.  There is still a need to closely compare the results that come back from these REST endpoints with the exact string of the email address queried for here.

Sorry if that isn't as clear as you would want to see this data, but I hope this helps.  Please let me know either way.

Andy

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you