Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/10/2023 06:51 AM
We are trying to import accounts from our GCP using the rest connector. We followed the guide/documentation here: https://docs.saviyntcloud.com/bundle/GoolgeDrive-v23x/page/Content/Using-the-Connector-Service.htm
JSON:
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://admin.googleapis.com/admin/directory/v1/users?customer=XXX",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json"
},
"listField": "users",
"colsToPropsMap": {
"name": "primaryEmail~#~char",
"displayName": "name.fullName~#~char",
"accountID": "id~#~char",
"customproperty3": "id~#~char"
}
}
}
}
}
We are getting the error:
Invalid record not processed. Error Message - Cannot invoke method trim() on null object. Total invalid records skipped: 3
The job is returning the amount of users in the API response, so that's good.
I'll add some of the API response here so you can see why the JSON is setup the way it is. Also, i'll add the complete logs in attachments.
API Response:
{
"kind": "admin#directory#users",
"etag": "XXX",
"users": [
{
"kind": "admin#directory#user",
"id": "XXX",
"etag": "XXX",
"primaryEmail": "XXX",
"name": {
"givenName": "XXX",
"familyName": "XXX",
"fullName": "XXX"
},
"isAdmin": true,
"isDelegatedAdmin": false,
"lastLoginTime": "XXX",
"creationTime": "XXX",
"agreedToTerms": false,
"suspended": false,
"archived": false,
"changePasswordAtNextLogin": false,
"ipWhitelisted": false,
"emails": [
{
"address": "XXX",
"type": "XXX"
},
{
"address": "XXX",
"primary": XXX
},
{
"address": "XXX"
}
],
"languages": [
{
"languageCode": "en",
"preference": "preferred"
}
],
"nonEditableAliases": [
"XXX"
],
"customerId": "XXX",
"orgUnitPath": "/",
"isMailboxSetup": false,
"isEnrolledIn2Sv": false,
"isEnforcedIn2Sv": false,
"includeInGlobalAddressList": true
}
}
Some help with this would be appreciated.
Solved! Go to Solution.
08/14/2023 10:18 AM
Are there a total of 3 records in the response or are there more number of record and we are getting error for only 3.
Can you update ConfigJSON param in the REST connection with value {"showLogs":true} and then run the job. This will print additional logs and may help identify the error.
08/16/2023 01:54 AM
Yes, there are a total of 3 records which should be imported so that's good.
"showLogs":true did not really add any more information to the job log:
08/16/2023 09:14 AM
Can you update your JSON and add keyField as well like below
"listField": "users",
"keyField": "accountID",
08/17/2023 01:30 AM
Thank you, I don't know why but the "keyField": "accountID" fixed it!
08/17/2023 08:54 AM
This is a required field to be defined in the JSON which lets the application know the key field value which is used to store the records in Saviynt. You may also call it the reconciliation field (which is a unique value).