Hi, we have a lot of user accounts which are owned by freelancers who work for our company. Is there a way to read all user accounts where the email address is not from our organization by using the REST API? Thanks in advanceFrank
Hi @Frank Dase, I'd load all the users using REST API endpoint https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get and filter it by the emailAddress value.
I did that, but I get some with email address and the most without. If I go this way, I have to make for each entry a 2nd REST API call with the accountID to get the email address. And the other thing is, I receive accounts of system apps as well. We have 205 accounts in total and I get 600.
got it now. I have to run it asUser and not asApp. Then I receive the email addresses.
Now I get a list of users, some have email addresses and some have no emailAddress node. Seems that the ones without the emailAddress node are the external users. That could be fine, but the list includes a lot of app users, too. Like "Zendesk Support for Jira", "Trello", "Slack" etc. I tried to to check the email by requesting it from rest/api/3/user/email/?accountId={accountId} but here I get the error "errorMessages: [ 'OAuth 2.0 is not enabled for method: GET /rest/api/2/user/email' ]"
So, how can I filter the system / app users from the list?
It looks like you're new here. Sign in or register to get started.