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

EnableAccount - get current entitlement to pass it to API

Jillustre
New Contributor III
New Contributor III

Hey, Did a couple of research for this with not success. IS it possible to get the current account entitlement to pass it to the api method into the EnableAccessJson. The account is currently disabled but want to get the entitlement to enable it on the application side with the old entitlement.

thanks

5 REPLIES 5

SB
Saviynt Employee
Saviynt Employee

Can you confirm the Connector type.


Regards,
Sahil

Jillustre
New Contributor III
New Contributor III

@SB REST Connector

SB
Saviynt Employee
Saviynt Employee

You can use multiple call to achieve this in case the target application supports fetching the existing entitlement information of user using api call.

Below is an example of the JSON you can try with. 

Here the 1st call will fetch the existing access of User and then save the response to send in 2nd call (Roles).

Note: The logic to pass the entitlements in 2nd call will depend on the format the target application supports and you may need to modify the json accordingly.

{
"call": [
{
"name": "Roles",
"connection": "acctAuth",
"url": "https://abc/v1/users/${user.email}/",
"httpMethod": "GET",
"httpParams": "{}",
"httpHeaders": {"Authorization": "Basic"},
"httpContentType": "application/json",
"successResponses": {
"statusCode": []
},
"unsuccessResponses": {
"statusCode": []
}
},
{
"name": "Roles",
"connection": "acctAuth",
"url": "https://abc/v1/users/${user.email}/",
"httpMethod": "PATCH",
"httpParams": "{\"Roles\": ${response.Roles.message.User.Roles}}",
"httpHeaders": {"Authorization": "Basic"},
"httpContentType": "application/json",
"successResponses": {
"statusCode": []
},
"unsuccessResponses": {
"statusCode": []
}
}
]
}


Regards,
Sahil

Jillustre
New Contributor III
New Contributor III

@SB 

In my case I will only use the first call to get it. but is this getting all the roles of a specific user? I want the role assigned to the account related to endpoint of the connection, is it the same call?

 

thanks

SB
Saviynt Employee
Saviynt Employee

@Jillustre You will need to use both the calls since the first call only brings the existing Access information in Saviynt.

Because you need to pass the existing access information in your Enable JSON, saviynt will need to pass this information (retrieved from call1) in your call2 which will ideally be your actual payload to enable the account/access.

Talking about your 2nd query - is this getting all the roles of a specific user?

This information fetched will depend on the api the target app supports. If you test from postman, can you fetch the existing information of 1 user? If this works, you can use the same in Saviynt as well.


Regards,
Sahil