Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Passing Role attribute value from role Name in the JSON

Sankar
New Contributor
New Contributor
We have new application(Rest based) which needs to be integrated with SIGA. 
 
Application Name - ABC
 
In this we have one requirement, while creating a user we need send an attribute called Role. 
 
They have total 3 different values for role attribute from app side.
 
Role name in SIGA Role attribute in App side
ABC Global Viewer ACCOUNT_VIEWER
ABC Global Power User ACCOUNT_EDITOR
ABC Global Admin ACCOUNT_ADMIN
 
Requirement:
 
End user selected a role name in SIGA, if it has viewer in role name, then we need to send Account_viewer as role attribute.
 
Can you please help us how can we achieve this from saviynt.
 
 
The below is sample body of user used in postman for creating the user. It is working from postman.
 
{
 "email": "xxxxx@xxxxxxx.com", &
 "permissionSetIds": [1152945],
 "name": "",
 "sendWelcomeEmail": null,
 "manageAccountUsers": false,
 "accountId": 1110602,&
 "firstName": "Test",&
 "lastName": "userDennis",&
 "role": "ACCOUNT_VIEWER",
 "uiTheme": "BLACK_THEME",
 "active": "true"&
}
 
 
Can you some Help me on this?
Thanks,
Sankar.
[This message has been edited my moderator to mask PII info]
9 REPLIES 9

naveenss
All-Star
All-Star

hi @Sankar ,

Can you share the JSON you're using?

 

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.

Sankar
New Contributor
New Contributor

Hi Naveen,

The below is the JSON I am using right now. I hard coded the role attribute value. But I need to read from role name s mentioned above. which is the best way to achieve it.

+++++++++++++++++++++++

{
"accountIdPath": "call1.message.id",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "userAuth",
"showResponse": true,
"url": "removed",
"httpMethod": "POST",
"httpParams": "{\"email\":\"${user.email}\",\"name\":\"\",\"accountId\":\"1110602\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"role\":\"ACCOUNT_VIEWER\",\"uiTheme\":\"BLACK_THEME\",\"active\":\"true\"}",
"httpHeaders": {
"content-Type": "application/json",
"Accept": "application/json",
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
}
]
}

 

+++++++++++++++++++++++

 

If you need more details please let me know.

Thanks,,

Sankar.

[This message has been edited by moderator to mask url]

Thanks for the Json, @Sankar  May I know how are you requesting the roles? Is it from the "Request access for others" or "Request enterprise roles" tile?

 

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.

Sankar
New Contributor
New Contributor

Hi Naveen,

From ARS > Request access option I need to use.

Sankar_0-1693557854099.png

Thanks,

Sankar

[This message has been edited by moderator to mask PII info. Note: Please make sure to mask any PII,URL's, Company/Employee Names/email addresses]

Sankar
New Contributor
New Contributor

Hi All,

Can some help me with solution on this?

Thanks,
Sankar.

${task.assignedFromRole.role_name}

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Sankar
New Contributor
New Contributor

Hi @rushikeshvartak ,

Can you please modify the role attributes from the below JSON. so that I can clearlyunderstand how can I use this.

++++++++++++++++++++

+++++++++++++++++++++++

{
"accountIdPath": "call1.message.id",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "userAuth",
"showResponse": true,
"url": "removed",
"httpMethod": "POST",
"httpParams": "{\"email\":\"${user.email}\",\"name\":\"\",\"accountId\":\"1110602\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"role\":\"ACCOUNT_VIEWER\",\"uiTheme\":\"BLACK_THEME\",\"active\":\"true\"}",
"httpHeaders": {
"content-Type": "application/json",
"Accept": "application/json",
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
}
]
}

+++++++++++++++++++++

Thanks,
Sankar.

store values in roles customproperty and  use customproperty in JSON


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Sankar
New Contributor
New Contributor

Hi All,

Can someone help me with the updates to fix this issue.

Thanks,

sankar.