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

SAV4SAV rest ImportAccountEntJSON issue

Rohit_Mishra
New Contributor III
New Contributor III

Hi Experts,

Request a help on ImportAccountEntJSON, issue is the accounts are getting inactive after import I tried many ways like hard coding the status to 2 for account table still its inactive

NOTE: target system is saviynt

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty11",
"activeStatus": [
1
],
"deleteLinks": true,
"accountThresholdValue": 10,
"correlateInactiveAccounts": false,
"inactivateAccountsNotInFile": true,
"deleteAccEntForActiveAccounts": true
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": """""/v5/user?q=accountExpired:0&fields=username,email,displayname,statuskey&sort=username&order=desc ",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "users",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "username~#~char",
"name": "username~#~char",
"displayName": "displayname~#~char",
"customproperty2": "email~#~char",
"customproperty11": "2~#~char",
"status": "active~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "max",
"batchSize": 500,
"totalCountPath": 999999999
}
}
}
}
},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": """"""/v5/getRoles ",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "POST",
"httpParams": "{\"requestedObject\":\"users\"}"
},
"listField": "Roledetails",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "roleKey~#~char",
"entitlement_value": "role_name~#~char",
"customproperty1": "roleKey~#~char",
"customproperty2": "role_name~#~char",
"acctEntMappingInfoColumnFromEnt": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"listField": "owner",
"idPath": "ownername",
"keyField": "accountID",
"importAsAccount": false
}
},
"Organization": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": """"""/v5/getOrganization ",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GETWITHBODY",
"httpParams": "{\"max\": \"1000\",\"offset\": \"0\",\"orgQuery\": \"c.organizationname like '%%'\"}"
},
"listField": "organizations",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "organizationname~#~char",
"entitlement_value": "displayname~#~char",
"acctEntMappingInfoColumnFromEnt": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"listField": "organizationowners",
"idPath": "username",
"keyField": "accountID",
"importAsAccount": false
}
},
"UserGroups": {
"entTypeOrder": 2,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": """"""/v5/fetchUserGroup ",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "POST",
"httpParams": ""
},
"listField": "usergroups",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "usergroupkey~#~char",
"entitlement_value": "user_groupname~#~char",
"acctEntMappingInfoColumnFromEnt": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"listField": "owners",
"idPath": "username",
"keyField": "accountID",
"importAsAccount": false
}
},
"SAVRoles": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": """"""/v5/userms/savroles ",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET",
"successResponses": {
"statusCode": [
200,
201
]
}
},
"listField": "savroles",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "ROLENAME~#~char",
"entitlement_value": "ROLENAME~#~char",
"customproperty1": "CUSTOMPROPERTY1~#~char"
}
}
}
}
}
},
"acctEntParams": {
"entTypes": {
"Roles": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "entToAcctMapping"
}
}
},
"Organization": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "entToAcctMapping"
}
}
},
"UserGroups": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "entToAcctMapping"
}
}
},
"SAVRoles": {
"call": {
"call1": {
"connection": "userAuth",
"acctKeyField": "accountID",
"callOrder": 0,
"stageNumber": 1,
"processingType": "httpEntToAcct",
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": """"""/v5/userms/savroles/${id}/users?limit=1000&offset=0 ",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "users",
"entKeyField": "entitlementID",
"acctIdPath": "username"
}
}
}
}
}
}

[This message has been edited by moderator to disable URL hyperlink]

3 REPLIES 3

naveenss
All-Star
All-Star

Hi @Rohit_Mishra you need to map customproperty11 of accounts to statuskey. Please see the updated JSON below. 

{
    "accountParams": {
      "connection": "userAuth",
      "processingType": "SequentialAndIterative",
      "statusAndThresholdConfig": {
        "statusColumn": "customproperty11",
        "activeStatus": [
          1
        ],
        "deleteLinks": true,
        "accountThresholdValue": 10,
        "correlateInactiveAccounts": false,
        "inactivateAccountsNotInFile": true,
        "deleteAccEntForActiveAccounts": true
      },
      "call": {
        "call1": {
          "callOrder": 0,
          "stageNumber": 0,
          "http": {
            "url": "/v5/user?q=accountExpired:0&fields=username,email,displayname,statuskey&sort=username&order=desc ",
            "httpHeaders": {
              "Authorization": "${access_token}",
              "Accept": "application/json"
            },
            "httpContentType": "application/json",
            "httpMethod": "GET"
          },
          "listField": "users",
          "keyField": "accountID",
          "statusConfig": {
            "active": "true",
            "inactive": "false"
          },
          "colsToPropsMap": {
            "accountID": "username~#~char",
            "name": "username~#~char",
            "displayName": "displayname~#~char",
            "customproperty2": "email~#~char",
            "customproperty11": "statuskey~#~char",
            "status": "active~#~char"
          },
          "pagination": {
            "offset": {
              "offsetParam": "offset",
              "batchParam": "max",
              "batchSize": 500,
              "totalCountPath": 999999999
            }
          }
        }
      }
    },
    "entitlementParams": {
      "connection": "userAuth",
      "processingType": "SequentialAndIterative",
      "entTypes": {
        "Roles": {
          "entTypeOrder": 0,
          "call": {
            "call1": {
              "callOrder": 0,
              "stageNumber": 0,
              "http": {
                "url": "/v5/getRoles ",
                "httpHeaders": {
                  "Authorization": "${access_token}",
                  "Accept": "application/json"
                },
                "httpContentType": "application/json",
                "httpMethod": "POST",
                "httpParams": "{\"requestedObject\":\"users\"}"
              },
              "listField": "Roledetails",
              "keyField": "entitlementID",
              "colsToPropsMap": {
                "entitlementID": "roleKey~#~char",
                "entitlement_value": "role_name~#~char",
                "customproperty1": "roleKey~#~char",
                "customproperty2": "role_name~#~char",
                "acctEntMappingInfoColumnFromEnt": "STORE#ACC#ENT#MAPPINGINFO~#~char"
              }
            }
          },
          "acctEntMappings": {
            "listField": "owner",
            "idPath": "ownername",
            "keyField": "accountID",
            "importAsAccount": false
          }
        },
        "Organization": {
          "entTypeOrder": 1,
          "call": {
            "call1": {
              "callOrder": 0,
              "stageNumber": 0,
              "http": {
                "url": "/v5/getOrganization ",
                "httpHeaders": {
                  "Authorization": "${access_token}",
                  "Accept": "application/json"
                },
                "httpContentType": "application/json",
                "httpMethod": "GETWITHBODY",
                "httpParams": "{\"max\": \"1000\",\"offset\": \"0\",\"orgQuery\": \"c.organizationname like '%%'\"}"
              },
              "listField": "organizations",
              "keyField": "entitlementID",
              "colsToPropsMap": {
                "entitlementID": "organizationname~#~char",
                "entitlement_value": "displayname~#~char",
                "acctEntMappingInfoColumnFromEnt": "STORE#ACC#ENT#MAPPINGINFO~#~char"
              }
            }
          },
          "acctEntMappings": {
            "listField": "organizationowners",
            "idPath": "username",
            "keyField": "accountID",
            "importAsAccount": false
          }
        },
        "UserGroups": {
          "entTypeOrder": 2,
          "call": {
            "call1": {
              "callOrder": 0,
              "stageNumber": 0,
              "http": {
                "url": "/v5/fetchUserGroup ",
                "httpHeaders": {
                  "Authorization": "${access_token}",
                  "Accept": "application/json"
                },
                "httpContentType": "application/json",
                "httpMethod": "POST",
                "httpParams": ""
              },
              "listField": "usergroups",
              "keyField": "entitlementID",
              "colsToPropsMap": {
                "entitlementID": "usergroupkey~#~char",
                "entitlement_value": "user_groupname~#~char",
                "acctEntMappingInfoColumnFromEnt": "STORE#ACC#ENT#MAPPINGINFO~#~char"
              }
            }
          },
          "acctEntMappings": {
            "listField": "owners",
            "idPath": "username",
            "keyField": "accountID",
            "importAsAccount": false
          }
        },
        "SAVRoles": {
          "entTypeOrder": 0,
          "call": {
            "call1": {
              "callOrder": 0,
              "stageNumber": 0,
              "http": {
                "url": "/v5/userms/savroles ",
                "httpHeaders": {
                  "Authorization": "${access_token}",
                  "Accept": "application/json"
                },
                "httpContentType": "application/json",
                "httpMethod": "GET",
                "successResponses": {
                  "statusCode": [
                    200,
                    201
                  ]
                }
              },
              "listField": "savroles",
              "keyField": "entitlementID",
              "colsToPropsMap": {
                "entitlementID": "ROLENAME~#~char",
                "entitlement_value": "ROLENAME~#~char",
                "customproperty1": "CUSTOMPROPERTY1~#~char"
              }
            }
          }
        }
      }
    },
    "acctEntParams": {
      "entTypes": {
        "Roles": {
          "call": {
            "call1": {
              "callOrder": 0,
              "stageNumber": 0,
              "processingType": "entToAcctMapping"
            }
          }
        },
        "Organization": {
          "call": {
            "call1": {
              "callOrder": 0,
              "stageNumber": 0,
              "processingType": "entToAcctMapping"
            }
          }
        },
        "UserGroups": {
          "call": {
            "call1": {
              "callOrder": 0,
              "stageNumber": 0,
              "processingType": "entToAcctMapping"
            }
          }
        },
        "SAVRoles": {
          "call": {
            "call1": {
              "connection": "userAuth",
              "acctKeyField": "accountID",
              "callOrder": 0,
              "stageNumber": 1,
              "processingType": "httpEntToAcct",
              "http": {
                "httpHeaders": {
                  "Authorization": "${access_token}"
                },
                "url": "/v5/userms/savroles/${id}/users?limit=1000&offset=0 ",
                "httpContentType": "application/json",
                "httpMethod": "GET"
              },
              "listField": "users",
              "entKeyField": "entitlementID",
              "acctIdPath": "username"
            }
          }
        }
      }
    }
  }

let me know if this helps!

 

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.

rushikeshvartak
All-Star
All-Star

You need to use #CONST 

"customproperty11": "#CONST#2~#~char",


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Rohit_Mishra
New Contributor III
New Contributor III

Thanks for the response everyone....

I tried using the below json by passing static values in url and it worked for that perticular user however it is not working dynamically


{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty11",
"activeStatus": [
1
],
"deleteLinks": true,
"accountThresholdValue": 10,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false,
"deleteAccEntForActiveAccounts": false
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "/v5/user?q=username:Mrwhite,accountExpired:0&fields=username,email,displayname,statuskey&sort=username&order=desc",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "results",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "username~#~char",
"name": "username~#~char",
"displayName": "displayname~#~char",
"customproperty2": "email~#~char",
"customproperty11": "statuskey~#~char",
"status": "active~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "max",
"batchSize": 500,
"totalCountPath": 999999999
}
}
}
}
}
}

 

Please help me  with your guidance