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

REST API do retrieve Active/Invited user status

Gwenaël Durand May 15, 2024

Hi all, 

in the page JSM project > Customers ,   you can see the list of users with their Status:  "Invited" for those having received an invit email butwho did not accepted it yet,  and "Active" for the ones who accepted the invitation.

 

I need to get the list of the one who are only "Invited" using a rest API. (I want to automate a reminder to these guys).

 

To do this, I use the API /rest/servicedeskapi/organization/{organizationId}/user 

This call returns something like this for each user of the company:

{ "name": "fred", 
"key": "fred",
"emailAddress": "fred@example.com",
"displayName": "Fred F. User",
"active": true,
...
}

I'm assuming that the field "active" is the one I'm looking for.

However the value of this "active" field is ALLWAYS  true.  Whatever  the company, the user or it's actual status.

 

Am I using the wrong API?   Anyone has an idea?

 

Thanks

Gwenaël

 

 

2 answers

0 votes
Vijay Dadi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2024

@Gwenaël Durand ;

 

use this rest api end pint to get customer data.

https://xxx.atlassian.net/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer

remember, if needed you have to use the header 

'X-ExperimentalApi: opt-in'

hope this helps!

Vijay 

Gwenaël Durand May 15, 2024

Thanks @Vijay Dadi : this request is giving the same result as my initial problem: all customers are flagged as "active": true in the json, eventhough their Status show "Invited" in the JSM project > Customer page.

So, either this active field is something different from the Status,   or they have a bug.

0 votes
Vijay Dadi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2024

@Gwenaël Durand 

use the rest api endpoint as below and see if you get the required response

https://xxx.atlassian.net/rest/api/3/user/search?username=.&includeActive=false&includeInactive=true

Vijay

Gwenaël Durand May 15, 2024

Thanks @Vijay Dadi . 

I didn't try yet, but I think this would return the Jira users (ie my colleagues). 

What I'm after is the list of customers of the Jira Service Management product.

 

Gwenaël

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events