Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

ImportAccoutEntJSON creation for the API

Shilpa_B
New Contributor II
New Contributor II

Hi Team,

I need your help in preparing ImportAccountEnt JSON for account and entitlement mapping for the below API.

{{baseUrl}}/v1/users/:id/roles-products?roleId=<integer>&productId=<string>

For example:

https://<hosturl>/v1/users/951/roles-products?roleId=14&productId=M

The sample postman response is as below

Shilpa_B_0-1691602981625.png

Thanks,

Shilpa

14 REPLIES 14

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Shilpa_B,

Can you provide the json what you have worked on and also currently it is not possible to parse through all the attributes, we can only parse user ID attribute as per above postman response,

And also would like to know postman response, if we pass only 
https://<hosturl>/v1/users/951/roles-products


If you find the above response useful, Kindly Mark it as "Accept As Solution".

Hi @sudeshjaiswal 

Attached the current JSON.

Response of https://<hosturl>/v1/users/951/roles-products

Shilpa_B_0-1691668797338.png

 

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Shilpa_B,

I didn't find any attached json?

If you find the above response useful, Kindly Mark it as "Accept As Solution".

@sudeshjaiswal 

[Edited message to mask URL from attached file]

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Shilpa_B,

I have sent you the json please try and let me know the result and also the above postman response you have shared i need from the line 1, as you have shared from line 23.

Thanks,

Thanks,

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Hi @sudeshjaiswal ,

Thank you for the json I am running import on this to check the result. Meanwhile please find the postman response for API

{
"items": [
{
"product": {
"id": "A",
"name": "Account"
},
"role": {
"id": 14,
"name": "System Admin"
}
},
{
"product": {
"id": "A",
"name": "Account"
},
"role": {
"id": 18,
"name": "API Access"
}
},
{
"product": {
"id": "M",
"name": "Matching"
},
"role": {
"id": 14,
"name": "System Admin"
}
},
{
"product": {
"id": "T",
"name": "Task"
},
"role": {
"id": 14,
"name": "System Admin"
}
}
],
"totalItems": 4
}

Shilpa_B
New Contributor II
New Contributor II

Hi @sudeshjaiswal 

Did you get a chance to check on this? How can we achieve for this kind of API?

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Shilpa_B ,

I have shared you the json, did you tried with that!

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Hi @sudeshjaiswal 

I tried with JSON that you had shared but it didnt work. Also I could see product id is not mapped here

Shilpa_B_0-1692780143021.png

 

Shilpa_B
New Contributor II
New Contributor II
 

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Shilpa_B,

What json i have shared with you have the below api in "Roles and Products"
v1/users/${id}/roles-products",

And json you have shared above contain the different API under Roles and Product.

/${id}/roles-products?roleId=${entitlementValue}&productId=A",
We cannot pass two dynamic value as the same call.

Thanks,

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Hi @sudeshjaiswal 

We can use the API in either way.. From the below listed, the first API gives access of an accountid for perticular role-product combination. The second API gives, the accountid having access to all role-products combination.

1. {{baseUrl}}/v1/users/951/roles-products?roleId=18&productId=A

2. {{baseUrl}}/v1/users/951/roles-products

From anyone of these API, we should be able to import the account access mapping into Saviynt.

Shilpa_B_0-1693394622585.png

 

Shilpa_B_1-1693394871711.png

 

 

Shilpa_B
New Contributor II
New Contributor II

@sudeshjaiswal 

Any update on this please?

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Shilpa_B,

Currently this is not possible,

1. {{baseUrl}}/v1/users/951/roles-products?roleId=18&productId=A
Have three binding variables, which cannot be achieved. 

2. {{baseUrl}}/v1/users/951/roles-products

mapping wont be possible.


Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".