Click HERE to see how Saviynt Intelligence is transforming the industry. |
02/22/2024 03:52 AM
Hi Team,
We have a requirement where we need to populate the CITY 3 letter abbreviated name from a Dataset for each user in one of the Users customproperty. I have created an analytics with the query to select the city shortname as per user's city attribute and trying to call the analytics in an UserImport JSON in SAV4SAV rest connection, but still the User CustomProperty is not getting populated.
=================================================================================
Here is the Analytics Query I Used :
SELECT U.USERNAME AS "USERNAME" ,DV.ATTRIBUTE2 AS "CUSTOMPROPERTY5" from USERS U,DATASET_VALUES DV
WHERE DV.DATASETNAME='City_Shortname' AND (U.CITY)=DV.ATTRIBUTE1
AND ((U.CUSTOMPROPERTY5 IS NULL) OR (U.CUSTOMPROPERTY5!=DV.ATTRIBUTE2)) AND U.STATUSKEY=1
=================================================================================
SAV4SAV REST Connection JSON:
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://@@BASEURL@@/ECM/api/login",
"httpMethod": "POST",
"httpParams": "{\"username\": \"XXXXXXXXXX\",\"password\": \"XXXXXXXXXXXXXX\"}",
"httpContentType": "application/json",
"httpHeaders": {
"Content-Type": "application/json"
},
"authError": [
"USER_AUTHENTICATION_FAILED",
"PARTNER_AUTHENTICATION_FAILED",
"AuthenticationFailed"
],
"errorPath": "errorCode",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "Bearer abcd",
"retryFailureStatusCode": [
401
]
}
}
}
=================================================================================
USER IMPORT JSON:
{
"connection": "userAuth",
"url": "https://@@BASEURL@@/ECM/api/v5/fetchRuntimeControlsData",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1515\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty5": "CUSTOMPROPERTY5~#~char"
},
"userResponsePath": "result"
}
Please tell me, where is the issue as I am unable to troubleshoot it for a long time
Solved! Go to Solution.
02/22/2024 04:42 AM - edited 02/22/2024 04:42 AM
Never mind :
Changed the UserImport JSON to :
{
"connection": "userAuth",
"url": "https://@@BASEURL@@/ECM/api/v5/fetchControlDetailsES",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1515\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty5": "CUSTOMPROPERTY5~#~char"
},
"userResponsePath": "result"
}
and the analytics was missing default actions (Accept, Revoke, Further Review)
02/22/2024 08:45 AM
Hi Team,
Please help here, the solution here is not updating for more than 50 users at a time and also I checked other forum discussion where they are requesting to use the URL as :
"url": "XXXXX/ECM/api/v5/FetchRuntimeControlsData" -- but I am not getting any response in Postman.
I am getting response in Postman in : "url": "XXXXX/ECM/api/v5/fetchControlDetailsES".
Currently I am using this Import User JSON, but this is not working:
{
"connection": "userAuth",
"url": "https://@@BASEURL@@/ECM/api/v5/fetchControlDetailsES",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1520\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty5": "CUSTOMPROPERTY5~#~char"
},
"userResponsePath": "result",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 50,
"totalCountPath": "completeResponseMap.total"
}
}
}
Please help here @rushikeshvartak , @AashishD.
02/22/2024 08:51 AM
can you try remove v5 in url and try pleae
02/22/2024 10:15 PM
02/22/2024 08:33 PM
Does it works from postman ?
02/22/2024 10:21 PM
@rushikeshvartak ,
No the below URL is not working from Postman :
https://@@BASEURL@@/ECM/api/v5/fetchRuntimeControlsData
However, the URL below is giving results in Postman, but only after the analytics is run manually on the console:
https://@@BASEURL@@/ECM/api/v5/fetchControlDetailsES
Moreover, the SAV4SAV rest connection is not able to update for more than 50 users at a time.
I have included Pagination in the userImport JSON, still it is not working:
{
"connection": "userAuth",
"url": "https://@@BASEURL@@/ECM/api/v5/fetchControlDetailsES",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1520\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty5": "CUSTOMPROPERTY5~#~char"
},
"userResponsePath": "result",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 50,
"totalCountPath": "completeResponseMap.total"
}
}
}
02/22/2024 10:31 PM
It seems your pagination is not working properly and you should use runtime report instead of normal report
02/22/2024 11:30 PM
Hi @rushikeshvartak ,
Thanks for your suggestion for RunTime Analytics report.
I created a Runtime Analytics report with same query and it is working in Postman with the below URL:
URL : https://@@BASEURL@@/ECM/api/v5/FetchRuntimeControlsDataV2
METHOD : POST
However, I believe since I am not able to add the "Allowed Action" in analytics like ("Accept"), it is not populating the data in User custom property. Please see attached screenshot.
Here is the updated UserImport JSON that I am using, but still user customproperty5 is not populating:
{
"connection": "userAuth",
"url": "https://@@BASEURL@@/ECM/api/v5/FetchRuntimeControlsDataV2",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1521\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty5": "CUSTOMPROPERTY5~#~char"
},
"userResponsePath": "result",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 50,
"totalCountPath": "completeResponseMap.total"
}
}
}
Please help with your suggestion how can we populate the customproperty5 by making the analytics work.
Also if you have a working pagination code, please send that as well and I can try that
02/23/2024 02:11 AM - last edited on 02/26/2024 01:46 AM by Sunil
Hi @rushikeshvartak ,
I have tried the following JSON, it is populating the customproperty5 with required value, but it is not going in recursive manner, and stopping in the 1st 500 batch of user.
Here is the USER IMPORT JSON i tried :
{
"connection": "userAuth",
"url": "https://@@BASEURL@@/ECM/api/v5/FetchRuntimeControlsDataV2",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1521\", \"max\":\"500\", \"offset\":\"0\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty5": "CUSTOMPROPERTY5~#~char"
},
"userResponsePath": "results",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 500,
"totalCountPath": "completeResponseMap.total"
}
}
}
I am getting around 11.5k entries in the Postman for the same analytics, but all of them are not getting stamped in one go. Is there a way to make it recursive and populate for all the users in 1 go.
regards,
Auvik
02/23/2024 06:10 AM - last edited on 02/23/2024 01:21 PM by Dave
I tried the following USERIMPORT JSON following this DOCS(https://docs.saviyntcloud.com/bundle/AzureAD-v24x/page/Content/Configuring-the-Integration-for-Impor...), as part of pagination, but still it is not working - It is still updating only 500 users(which is the max limit):
Here is the USERIMPORT JSON:
=====================================================================
{
"connection": "userAuth",
"url": "https://@@BASEURL@@/ECM/api/v5/FetchRuntimeControlsDataV2",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1521\", \"max\":\"500\", \"offset\":\"0\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty5": "CUSTOMPROPERTY5~#~char"
},
"userResponsePath": "results",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 500,
"totalCountPath": "completeResponseMap.total"
},
"nextUrl": {
"nextUrlPath": "${(response?.completeResponseMap?.get('@odata.nextLink')==null)? null : response?.completeResponseMap?.get('@odata.nextLink')}"
}
}
}
Please help me here, this has been stuck for a while now.
02/23/2024 11:25 AM - last edited on 02/23/2024 01:20 PM by Dave
Hi @rushikeshvartak ,
I believe the pagination is kind of working but however it is not updating more than 500 users(refer screenshot : JobLog) , do you know the reason.
The below is the latest Updated JSON after which I am getting the logs (refer screenshot : Logviewer_Pagination)
User Import JSON:
==========================================================================
{
"connection": "userAuth",
"url": "https://@@BASEURL@@/ECM/api/v5/FetchRuntimeControlsDataV2",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1521\", \"max\":\"500\", \"offset\":\"0\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty5": "CUSTOMPROPERTY5~#~char"
},
"userResponsePath": "results",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 500,
"totalCountPath": "completeResponseMap.totalcount"
}
}
}
====================================================================================
Please can anyone help me on this.
@Saviynt employees, if you have an answer please check and help
02/25/2024 10:35 AM
02/25/2024 10:17 PM
Hi @AuvikDey try changing the "batchParam": "displaycount", to "batchParam": "max", in your pagination logic
02/26/2024 01:14 AM - last edited on 02/26/2024 01:46 AM by Sunil
Hi @naveenss , @rushikeshvartak
I tried changing the logic in Pagination and set it to as below, still only 500 users are getting updated and rest of the users are not getting updated.
Please find the JSON below which I am trying :
===================================================================================
{
"connection": "userAuth",
"url": "https://@@BASEURL@@/ECM/api/v5/FetchRuntimeControlsDataV2",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1521\", \"max\":\"10000\", \"offset\":\"0\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty5": "CUSTOMPROPERTY5~#~char"
},
"userResponsePath": "results",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "max",
"batchSize": 500,
"totalCountPath": "completeResponseMap.totalcount"
}
}
}
==================================================================================
Please let me know how this can be fixed.
02/26/2024 09:07 AM
The below JSON finally worked and the pagination works:
Please find the JSON below which I am trying :
===================================================================================
{
"connection": "userAuth",
"url": "https://@@BASEURL@@/ECM/api/v5/FetchRuntimeControlsDataV2",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"XXXX\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"username": "USERNAME~#~char",
"customproperty5": "CUSTOMPROPERTY5~#~char"
},
"userResponsePath": "results",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "max",
"batchSize": 500,
"totalCountPath": "completeResponseMap.totalcount"
}
}
}
==================================================================================