In the Organizations REST API, for the resourceIds parameter of the "Search for users in an organization" endpoint, how do I get the value of the Atlassian Resource Identifier (ARI)?
I checked the parameters of the network request through the browser console, and they contain a GUID portion. Therefore, this is not a fixed value. So how should I obtain the complete Atlassian Resource Identifier (ARI) value?
Hello @4001 126
What is being referred to as Atlassian Resource ID is the ID for a Site within your Organization.
Here is a KB about getting the IDs for the Sites in your Organization.
https://support.atlassian.com/jira/kb/retrieve-my-atlassian-sites-cloud-id/
And here is an alternate method to use the endpoint /oauth/token/accessible-resources in section 3.1 of this document:
https://developer.atlassian.com/cloud/confluence/oauth-2-3lo-apps/
Correction to my earlier reply. I built that ARI from the wrong field. ari:cloud:jira::site/{guid} is the example the spec hangs on the role association resource, and that field's own description contradicts its example. It lists which resources are valid and jira is not one of them. jira-core, jira-software, jira-servicedesk, jira-admin and confluence are. The example the spec puts on resourceIds itself, and on the ResourceId schema, is ari:cloud:jira-core::site/1. So hand-assembling ari:cloud:jira::site/{yourCloudId} and filtering with that can return you nothing.
I am not going to pick a token for you, since it depends on which products sit on the site. Read it instead. GET /v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}/role-assignments gives you resourceId in the exact form the filter takes, with resourceOwner beside it. Pass a hyphen for directoryId to cover every directory you can manage. The confluence example I gave is on the valid list, so that one stands.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @4001 126, the GUID is the site id, so Trudy's links get you that part. What neither of those covers is that a resource is a product on a site, so one site hands you a different resource id for Jira and for Confluence.
The shape is ari:cloud:{product}::site/{siteId}. Note the empty segment between the two colons. Straight out of the org API's own examples, ari:cloud:jira::site/70ef3a32-d0da-4e09-b35e-0109f91969c3 and ari:cloud:confluence::site/12345678-1234-1234-1234-123456789012.
Easier than assembling it by hand, GET /v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}/role-assignments returns resourceId already in that form, one entry per product. Copy the one you want.
https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/
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.