I am working on following the below guide to map users jira accounts to an asset.
Mapping Azure AD (Entra ID) Users with Jira Users and Jira Groups - Web Site - Confluence
One of the first steps is to use a Get web request to Jira API to lookup the users Jira account ID. If i create an API key with no scope this works great. But when i try it with a API key with the scope read:jira-user i get no results on the web request.
I'm an org admin so creating an API key with all of my rights is a little worrisome. I would much rather create one with just read access.
Am i using the wrong scope or any ideas what i might be doing wrong here?
Hello @Wood_ Jeremy ,
Try this URL ->
https://api.atlassian.net/ex/jira/<cloud-id>/rest/api/3/search/jql?jql="YOUR_JQL_QUERY"
Permissions are required for OAuth 2.0 scopes required:
read:jira-work
read:issue-details:jira
, read:audit-log:jira
, read:avatar:jira
, read:field-configuration:jira
, read:issue-meta:jira
Hope this helps.
Hi Harpeet. It looks like you are correct. I'm using the wrong URL. Can you please see my reply to Marc asking for some more information on the different URL?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Wood_ Jeremy
The correct URL is below
https://api.atlassian.com/ex/jira/<your-cloud-id>/rest/api/3/user/search?query=email-address
/rest/api/2/
: This refers to version 2 of the Jira REST API. It is the older version and has been around for quite some time.
/rest/api/3/
: This refers to version 3 of the Jira REST API, which is the newer version introduced.
read:jira-user
read:user:jira
read:user.property:jira
read:application-role:jira
read:avatar:jira
read:group:jira
Refer this DOC->
Find user You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the API you are making?
Unscoped Token
https://<yourdomain>/atlassian.net/rest/api/3/search/jql
Scoped Token
https://api.atlassian.com/ex/jira/<cloudid>/rest/api/3/search/jql
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc,
From you reply it sounds like i may have the wrong URL then. Doing some more digging into this i do see where Atlassian requires a different URL for scoped keys. But I'm a bit confused on how i would use the new URL for a user Query.
Does the /2 vs the /3 after API in the URL make a difference?
Here is what the guide instructed:
Send a GET web request to Jira API using the URL:
https://your-site-name.atlassian.net/rest/api/2/user/search?query={{object."E-mail Address"}}
Based on the new URL would this then be the correct version for a scoped API key?
https://api.atlassian.com/ex/jira/<cloudid>/rest/api/2/user/search?query={{object."E-mail Address"}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, but I would suggest to use the API v3.
https://api.atlassian.com/ex/jira/<cloudId>/api/3/user/search?query={{object."E-mail Address"}}
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.