I am writing a custom widget for submitting tickets. The user authenticates with my page using email and password. At the backend, when submitting a ticket thru my widget, the users account is located via their email address and a ticket is created with them as the reporter. If the user does not already exist, they are invited. Problem is I cannot find a reliable way to look up a user by their email address. So far, I have found 2 methods:
1 `rest/api/3/user/search?query='example@example.com'`
This mostly works. All I have to do is find the result with the matching email address. Only problem is, if the user has their email address hidden, they will not be in the results.
2: `rest/api/3/groupuserpicker?query='example@example.com'`
Same problem as the last one - does not return any users with email hidden (even as a site admin). This one doesn't return email addresses at all anyway so it'd be impossible to find the matching result anyway.
This creates an issue where the widget cannot find the user, so it goes to create one instead. It cant create a user either, because one already exists under that email. How can I get a user by email address as a site admin via the rest API?
I had a similar issue with this.
I noticed that when I verified my domain and claimed those users as "managed accounts", the emailAddress values were included in the response for those accounts.
This is specifically in regards to
GET /rest/api/3/user/search
GET /rest/api/3/users/search
I have not seem this documented or confirmed by Jira though.
Try not to rely on email addresses on cloud. By default this is based on the user privacy settings. If you're creating an external app, you can request for the email API, however you have to be a vendor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.