How to fetch CloudID for the domain chosen by the user in Jira Oauth(2.0) app

Hi there, I am trying to integrate my third party application using Oauth2.0 App provided by Jira. After configuring the app on the jira side when we access the Authorization URL, the user is made to choose one of the “Domains” he has access to. After fetching the access token, we need to get the “cloudId” of the selected domain, post which we can make rest api calls.
My requirement is to fetch the cloudId of the domain which the user selected in the first place while giving the access through the authorization url. In the documentation it is written that we need to fetch the cloud id of all the accessible domains using -https://api.atlassian.com/oauth/token/accessible-resources
which gives us a list of all the domains the user has access to. Now how do I filter out the domain which the user selected in the very first page.
Please give me any solution and feel free to ask any more details of my use case.

1 Like

Did you get an answer to this? I’m in need of an answer too.

Welcome to the Atlassian developer community @DanHoskins,

This thread seems to be a duplicate:

The short conclusion is there isn’t a solution. For more detail about getting one, see my last post on that thread:

Since there isn’t a good answer, I’m going to close this thread in favor of folks interacting with the public issue tracker mentioned on the prior thread.

1 Like