The steps I followed were as follows:
1. I defined the Jira Rest API scope to view user profiles (read:jira-user)
2. I obtained an authorization code using the authorization URL
3. Exchanged the authorization code for a bearer token using the link: https://auth.atlassian.com/oauth/token
4. Used the bearer token to search for a user using the Query:
curl -X GET \
https://<site>.atlassian.net/rest/api/3/user/search?query=%'\
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Bearer Token>' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/json' \
-H 'Host: <site>.atlassian.net' \
-H 'Postman-Token: 8cf2cf71-15b0-4e15-a7c1-65bf0be730ed,b63f2a6f-85fa-455a-b5f2-66088483c422' \
-H 'User-Agent: PostmanRuntime/7.15.0' \
-H 'accept-encoding: gzip, deflate' \
-H 'cache-control: no-cache' \
-H 'content-length: 23' \
-H 'cookie: atlassian.xsrf.token=BET3-9NB2-SL21-3ZD3_946fdfc8ec4999d356397800e32416b41fc70b82_lout' \
-b atlassian.xsrf.token=BET3-9NB2-SL21-3ZD3_946fdfc8ec4999d356397800e32416b41fc70b82_lout \
For that I get the response:
[]
But I should be getting a list of 5 users instead.
Am I doing something wrong here?