Getting an empty list when using the search_users function against Jira Cloud
jira_user = jira.search_users(query=email, maxResults=20)
print(len(jira_user))
jira_user = jira.search_users(user=display_name, maxResults=20)
print(len(jira_user))
Welcome to the community.
So there a scripts developed by users, not Atlassian, the link provided.
Ask the developers of the scripts to help you out.
On Cloud the only way to get a user is via the Account ID, also see API doc's
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get
You can get a user based on email via the API.
The call should be: https://<intance-name>.atlassian.net/rest/api/3/user/search?query={{<email-addresss>.urlEncode}}
hi @Marc - Devoteam I actually get the same empty list when using the API request directly. Again it works fine on the jira server instance using:
/rest/api/2/user/search?username=email
Could I be missing some specific extra permission needed on Jira Cloud for retrieving user information?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As mentioned, on Cloud you can only get a user via the account ID in API, or the API search call , providing the full email address.
/rest/api/3/user/search?query=
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @mar ya that's the form I used for Jira Cloud:
https://ibm-qrs-sandbox-001.atlassian.net/rest/api/3/user/search?query=<email>
I was just indicating with the /rest/api/2/user/search?username=email that I tried the equivalent call on Jira server and it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.