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

Remove Access for an account through passing ID of Account-Entitlement mapping in Saviynt

PRATYUSH
New Contributor III
New Contributor III
We are trying to remove the role from a user using the unique ID given to the mapping between the user and role.
Whenever a role is assigned to a user, a unique ID is given to the mapping between the user and the role, called the UserRoleID. We want to pass this UserRoleID in the URL for revoking the role from a user. 
When you need to revoke entitlement1 from account account1, you would just need to pass the unique UserRoleID for that account-entitlement , say abc123 in the Revoke request
 
The URL for getting the Account-Entitlement mapping is:
 
 
where GUID is the accountID
 
The response payload is:
 
 
{
 
        {
            "UserRoleId"312,
            "RoleId"1111111111111111111111,
            "RoleCode"name1,
          
                }
            ]
        },
        {
            "UserRoleId"3143,
            "RoleId"2222222222222,
            "RoleCode""name2",
            "    "items": [
}
 
 
 
Through this response we are trying to pass the UserRoleID in the 2nd  URL:
 
The 2nd URL is:

 
 
https://?????????????????/UserRoleRevocation?GUID=xxxxxxx&UserRoleID=#######
 
​There is no response from this 2nd URL and it gives "204 No Content" Response
 
 
Please suggest a way we can achieve this solution.
1 REPLY 1

sahajranajee
Saviynt Employee
Saviynt Employee

Hi Pratyush,

Which version of Saviynt are you on? 
In your remove access json, you need to put the input of the first call into the url of the second call.

You should be able find examples of this in our rest connector documentation guide:
https://saviynt.freshdesk.com/support/solutions/articles/43000521736-rest-connector-guide

I am attaching an update account json sample below. You can do similar for your remove access json.

{
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"responseColsToPropsMap": {
"displayname": "call2.message.user.name~#~char"
},
"call": [
{
"name": "call1",
"callOrder": 0,
"connection": "acctAuth",
"url": "https://saviynt3381.zendesk.com/api/v2/users/${account.accountID}",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
204,
201,
200
]
}
},
{
"name": "call2",
"callOrder": 1,
"connection": "acctAuth",
"url": "https://saviynt3381.zendesk.com/api/v2/users/${response.call1.message.user.id}",
"httpMethod": "PUT",
"httpParams": "{\"user\": {\"name\": \"${user.firstname} ${user.lastname}\"}}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
204,
201,
200
]
}
}
]
}






Regards,
Sahaj Ranajee
Sr. Product Specialist