PARTNERS - Please join us for our upcoming webinar:
Leveraging Intelligent Recommendations for Operational Transformation.
AMS Partners click HERE | EMEA/APJ Partners click HERE

unable to fetch roles from JIRA

sairamya15
New Contributor III
New Contributor III

Hi All,

I have integrated JIRA application using REST Connection, I am able to fetch accounts, groups and projects but no roles were pulled in to saviynt below is the code I have used. kindly let me know if i have missed anything.

Also we are unable to link projects and roles to the accounts.

{
"accountParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"statusAndThresholdConfig":{
"statusColumn":"customproperty4",
"activeStatus":[
"true"
],
"deleteLinks":false,
"accountThresholdValue":100000,
"correlateInactiveAccounts":false,
"inactivateAccountsNotInFile":false,
"deleteAccEntForActiveAccounts":true
},
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url":"https://XXX-sandbox-871.atlassian.net/rest/api/2/users",
"httpHeaders":{
"Authorization":"${access_token}",
"Accept":"application/json"
},
"httpContentType":"application/json",
"httpMethod":"GET"
},
"listField":"",
"keyField":"accountID",
"colsToPropsMap":{
"accountID":"accountId~#~char",
"name":"displayName~#~char",
"status":"active~#~bool",
"accounttype":"accountType~#~char",
"customproperty1":"timeZone~#~char",
"customproperty2":"locale~#~char",
"customproperty3":"self~#~char",
"customproperty4":"active~#~char",
"customproperty5": "emailAddress~#~char"
},
"pagination":{
"offset":{
"offsetParam":"startAt",
"batchParam":"maxResults",
"batchSize":50,
"totalCountPath":100000
}
}
}
}
},
"entitlementParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"entTypes":{
"Group":{
"entTypeOrder":0,
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url":"https://XXX-sandbox-871.atlassian.net/rest/api/2/groups/picker",
"httpHeaders":{
"Authorization":"${access_token}",
"Accept":"application/json"
},
"httpContentType":"application/json",
"httpMethod":"GET"
},
"listField":"groups",
"keyField":"entitlementID",
"colsToPropsMap":{
"entitlementID":"name~#~char",
"entitlement_value":"name~#~char",
"customproperty1":"groupId~#~char"
}
}
}
},
"Project":{
"entTypeOrder":1,
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url":"https://XXX-sandbox-871.atlassian.net/rest/api/2/project/search",
"httpHeaders":{
"Authorization":"${access_token}",
"Accept":"application/json"
},
"httpContentType":"application/json",
"httpMethod":"GET"
},
"listField":"values",
"keyField":"entitlementID",
"colsToPropsMap":{
"entitlementID":"id~#~char",
"entitlement_value":"name~#~char",
"customproperty1":"key~#~char",
"customproperty2":"self~#~char"
},
"pagination":{
"offset":{
"offsetParam":"startAt",
"batchParam":"maxResults",
"batchSize":1,
"totalCountPath":"completeResponseMap.total"
}
}
}
}
},
"Roles":{
"entTypeOrder":2,
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url":"https://XXX-sandbox-871.atlassian.net/rest/api/2/role",
"httpHeaders":{
"Authorization":"${access_token}",
"Accept":"application/json"
},
"httpContentType":"application/json",
"httpMethod":"GET"
},
"listField":"applicationRoles",
"keyField":"entitlementID",
"colsToPropsMap":{
"entitlementID":"id~#~char",
"entitlement_value":"name~#~char",
"description":"description~#~char",
"customproperty1":"self~#~char"
}
}
}
}
}
},
"acctEntParams":{
"connection":"acctAuth",
"entTypes":{
"Group":{
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"processingType":"httpEntToAcct",
"http":{
"httpHeaders":{
"Authorization":"${access_token}",
"Accept":"application/json"
},
"url":"https://XXX-sandbox-871.atlassian.net/rest/api/2/group/member?groupname=${id.replace(' ','%20')}",
"httpContentType":"application/json",
"httpMethod":"GET"
},
"listField":"values",
"entKeyField":"entitlementID",
"acctIdPath":"accountId",
"acctKeyField":"accountID",
"pagination":{
"offset":{
"offsetParam":"startAt",
"batchParam":"maxResults",
"batchSize":2,
"totalCountPath":"completeResponseMap.total"
}
}
}
}
}
}
}
}

8 REPLIES 8

naveenss
All-Star
All-Star

Hi @sairamya15 is the fetch role API working from postman? 

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

NM
Honored Contributor
Honored Contributor

Hi @sairamya15 share postman response

sairamya15
New Contributor III
New Contributor III

Hi 
we don't have access to the postman, but below is the postman response shared by the client 

{
"self": "https://xxxxx-sandbox-871.atlassian.net/rest/api/2/user?accountId=5b72e27ee6230705b624da30",
"accountId": "5b72e27ee6230705b624da30",
"accountType": "atlassian",
"emailAddress": "james.doyle@xxx.com",
"avatarUrls": {
"48x48": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/5b72e27ee6230705b624da30/acfd2...",
"24x24": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/5b72e27ee6230705b624da30/acfd2...",
"16x16": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/5b72e27ee6230705b624da30/acfd2...",
"32x32": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/5b72e27ee6230705b624da30/acfd2..."
},
"displayName": "James Doyle",
"active": true,
"timeZone": "America/New_York",
"locale": "en_US",
"groups": {
"size": 18,
"items": [
{
"name": "admin-confluence-cloud",
"groupId": "a0f8f6d5-5c98-4a02-b138-f8a293f3a2d1",
"self": "https://xxxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=a0f8f6d5-5c98-4a02-b138-f8a293f3a2d1"
},
{
"name": "admin-jira-cloud",
"groupId": "7aef809c-a647-496b-929b-1353eaa58721",
"self": "https://xxxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=7aef809c-a647-496b-929b-1353eaa58721"
},
{
"name": "admin-site-cloud",
"groupId": "b551d64a-43c6-402a-b767-45b512adedb3",
"self": "https://xxxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=b551d64a-43c6-402a-b767-45b512adedb3"
},
{
"name": "confluence-system-admins",
"groupId": "ca42ed17-f904-4c2d-90b8-8aa5f80d0518",
"self": "https://xxxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=ca42ed17-f904-4c2d-90b8-8aa5f80d0518"
},
{
"name": "confluence-users",
"groupId": "5fe94703-5bb5-4ec3-b7f5-cbeaf1dceac8",
"self": "https://xxxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=5fe94703-5bb5-4ec3-b7f5-cbeaf1dceac8"
},
{
"name": "g_atlassianUsers",
"groupId": "461f321d-0ae0-437c-b5f5-b24cbe47b9c5",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=461f321d-0ae0-437c-b5f5-b24cbe47b9c5"
},
{
"name": "jira-administrators",
"groupId": "fc1496f1-7009-4626-b67e-8da842764867",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=fc1496f1-7009-4626-b67e-8da842764867"
},
{
"name": "jira-pe-finance",
"groupId": "30b38576-ff3d-4476-9716-cc87bd58cf06",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=30b38576-ff3d-4476-9716-cc87bd58cf06"
},
{
"name": "jira-prod-support",
"groupId": "4e1e6c1d-410b-47d4-9a5a-4f5e81471bb2",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=4e1e6c1d-410b-47d4-9a5a-4f5e81471bb2"
},
{
"name": "jira-servicedesk-users",
"groupId": "573553ca-d1f3-4dde-b93f-daa8e5f2809c",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=573553ca-d1f3-4dde-b93f-daa8e5f2809c"
},
{
"name": "jira-servicemanagement-customers-dcsgcloud",
"groupId": "a908c708-75a6-409d-8d53-70276b49d834",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=a908c708-75a6-409d-8d53-70276b49d834"
},
{
"name": "jira-system-admins",
"groupId": "faa35409-8be5-4568-887b-5ca2ea08bdc9",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=faa35409-8be5-4568-887b-5ca2ea08bdc9"
},
{
"name": "jira-users",
"groupId": "13a6e7b1-cf6d-469a-83da-6fe54af91de8",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=13a6e7b1-cf6d-469a-83da-6fe54af91de8"
},
{
"name": "service-desk-agents",
"groupId": "02a3d5c3-d9a8-4404-a49a-c73553bd123e",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=02a3d5c3-d9a8-4404-a49a-c73553bd123e"
},
{
"name": "site-admins",
"groupId": "ce59a9a0-be91-41ac-b696-c7e36f07c244",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=ce59a9a0-be91-41ac-b696-c7e36f07c244"
},
{
"name": "stash-ecom-it-admin",
"groupId": "fc5cfee7-ef53-4e5b-a65e-034e0fcc85d9",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=fc5cfee7-ef53-4e5b-a65e-034e0fcc85d9"
},
{
"name": "Tech-ServiceManagement",
"groupId": "b61e6552-fd72-4e95-9edd-8e1052c7f1aa",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=b61e6552-fd72-4e95-9edd-8e1052c7f1aa"
},
{
"name": "totf-permissions",
"groupId": "2cad9d6e-162d-4a88-bef7-2f17f5e0f5b1",
"self": "https://xxx-sandbox-871.atlassian.net/rest/api/2/group?groupId=2cad9d6e-162d-4a88-bef7-2f17f5e0f5b1"
}
]
},
"applicationRoles": {
"size": 2,
"items": [
{
"key": "jira-servicedesk",
"name": "Jira Service Desk"
},
{
"key": "jira-software",
"name": "Jira Software"
}
]
},
"expand": "groups,applicationRoles"
}

Does jira-software is application role here in response ?


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi @rushikeshvartak 

Yes below 2 are the application roles assigned to the user.

"applicationRoles": {
"size": 2,
"items": [
{
"key": "jira-servicedesk",
"name": "Jira Service Desk"
},
{
"key": "jira-software",
"name": "Jira Software"
}
]
},

NM
Honored Contributor
Honored Contributor

Hi @sairamya15 , that means API that you are using to import entitlement isn't performing any job right?

"listField":"applicationRoles.items",
"keyField":"entitlementID",
"colsToPropsMap":{
"entitlementID":"key~#~char",
"entitlement_value":"value~#~char",
"description":"value~#~char"


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Saviynt_Savvy
Regular Contributor
Regular Contributor

Hi @sairamya15 ,

Try to remove the remove the applicationRoles from the listfield.  Mention it as null and run the import job.

"listField": "",
"keyField": "entitlementID

Thanks & Regards,
SaviyntSavvy
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.