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 advance
Frank
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
got it now. I have to run it asUser and not asApp. Then I receive the email addresses.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
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.