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

How to get all users which is managed by identity providers?

quyen's hoang September 27, 2022

How can I know which account is managed by Identify providers? 

Is there any REST API for this? Can I identify it by access_billable field in https://developer.atlassian.com/cloud/admin/organization/rest/api-group-orgs/#api-orgs-orgid-users-get

Thanks in advanced!

1 answer

0 votes
Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 27, 2022

Hi @quyen's hoang,

Take a looks at the User Provisioning REST APIs:
https://developer.atlassian.com/cloud/admin/user-provisioning/rest/api-group-users/#api-scim-directory-directoryid-users-get

I'm pretty sure if you use the Get Users API it will only return those which are provisioned by your identity provider.

I hope that helps!

quyen's hoang September 27, 2022

Thanks a lot for your answer!

For user provisioning REST APIs, it will need the directory id. If an organization have multiple directories, how can I get all directories id by REST API to get all users of each directory. 

Hope you have nice day!

quyen's hoang September 27, 2022

Also, is Users managed by identity providers appears in admin.atlassian.net Directory -> Users and https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-bulk-get
I see that all users from this API have accountId and accountType, but the users returned from User Provision API don't have AccountId. 

I'm new here and I tried to find all documentation and still don't find the answers for this.

Thank you and sorry for this dump question. 

Look forward to hearing from you soon!

Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 27, 2022

1) Getting the domains - You are going to want to check out the Get Domains in Organization API: https://developer.atlassian.com/cloud/admin/organization/rest/api-group-orgs/#api-orgs-orgid-domains-get

2) For the difference between the Jira & User Provisioning APIS - One is querying the user list in Jira where every user is assigned an accountID (a unique number that represents you Atlassian ID).  The User Provisioning APIs are interacting directly with your third party identity provider so you won't get an Atlassian accountId but you can get much more detailed information about each user.

Like quyen's hoang likes this
quyen's hoang September 27, 2022

1) Is it the same between domain Id and directory Id? 

2) I understand.

Thank you so much for your reply!

Like Jimmy Seddon likes this
Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 28, 2022

Yes I believe domain Id & directory Id are the same thing.

Like quyen's hoang likes this
quyen's hoang September 28, 2022

Thank you for this!

Hi @quyen's hoang

Are you able to get the Directory ID or the domain ID to make it work?
I tried with the domain ID but it does not work.

quyen's hoang December 14, 2022

@Phong Nguyen - Atlassian Solutions Engineer Hi, 
It is not able to get the Directory ID from the API. It can only see the Directory Id when you setup User provisioning or regenerate user provisioning API key if you have already setup

How to get API key and Directory Id:

- Go to admin.atlassian.com and navigate to Security > Identity Provider

- Click to an Identity Provider (a Directory)

- Scroll down and click “Regenerate API Key“ in User Provision section if you have already setup user provisioning or 'Set up provisioning' to if you haven't setup

Screenshot_3.png
Screenshot_4.png



Thank you @quyen's hoang

I can find the Directory ID from the Identity Provider portal (Okta for my case). Thank you anyway.

Like quyen's hoang likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events