Leveraging Intelligent Recommendations for Operational Transformation. AMS Partners click HERE | EMEA/APJ Partners click HERE |
03/18/2024 09:16 AM
Greetings,
I am working on a REST connection - BASIC Authorization.
I am not able to import users/accounts and getting error from the recon job.
"Failed to import one or more object types. Check
the Job Log Details page for more information."
Can't attach the log file here but would send directly in private message.
This is my ImportAccountEntJSON
{
"accountParams": {
"connection": "Basic",
"createUsers": true,
"adminName": "admin",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"deleteLinks": false,
"accountThresholdValue": 30,
"correlateInactiveAccounts": false,
"inactivateAccountsNotInFile": false,
"deleteAccEntForActiveAccounts": true
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "XXXXXXXXXXX",
"httpHeaders": {
"Authorization": "${connection.accessToken}",
"Accept": "application/xml"
},
"httpContentType": "application/xml",
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "Xid~#~char",
"name": "FirstName~#~char"
},
"disableDeletedAccounts": true
}
}
}
}
Can someone guide me here.
Solved! Go to Solution.
03/18/2024 09:36 AM
it is rest connector right , can do below changes let me know
"Authorization": "${accessToken}",
"Accept": "application/json"
"httpContentType": "application/json"
03/19/2024 01:33 AM
Did the asked changes, got the same error.
@rushikeshvartak I have shared the log file with you.
Maybe that can help!
03/18/2024 08:29 PM
Please additional logs after clicking Job attribute name from Job details page.
03/19/2024 07:41 AM
Hi @mirani,
add this.
"Authorization": "${access_token}",
"Accept": "application/json"
"httpContentType": "application/json"
03/22/2024 07:58 AM
I am finding this in logs.
"Connection name provided in accountJSON is not found"
The connection details are correct though.
03/22/2024 08:24 AM
Please share both jsons / connections json and import json
03/26/2024
02:29 AM
- last edited on
03/26/2024
02:52 AM
by
Sunil
Sure,
Connection json
{
"authentications": {
"acctAuth": {
"authType": "Basic",
"url": "XXXXXXX" ,
"httpMethod": "POST",
"httpParams": {},
"httpHeaders": {},
"httpContentType": "text/html",
"properties": {
"userName":"XXXXXXX",
"password":"XXXXXXX"
},
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"timeOutError": "Read timed out",
"testname": "<test URL>",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Basic",
"accessToken": "Basic <<TOKEN>>",
"apiRateLimitConfig": {"retryAfterCalls": 100,"retryWaitSeconds": 60}
}
}
}
ImportAccountEntJSON
{
"accountParams": {
"connection": "Basic",
"createUsers": true,
"adminName": "admin",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"deleteLinks": false,
"accountThresholdValue": 30,
"correlateInactiveAccounts": false,
"inactivateAccountsNotInFile": false,
"deleteAccEntForActiveAccounts": true
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "XXXXXXX" ,
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/xml"
},
"httpContentType": "application/xml",
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "Xid~#~char",
"name": "FirstName~#~char"
},
"disableDeletedAccounts": true
}
}
}
}
[This message has been edited by moderator to disable url hyperlink]
03/26/2024 09:18 PM
ImportAccountEntJSON
{
"accountParams": {
"connection": "acctAuth",
"createUsers": true,
"adminName": "admin",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"deleteLinks": false,
"accountThresholdValue": 30,
"correlateInactiveAccounts": false,
"inactivateAccountsNotInFile": false,
"deleteAccEntForActiveAccounts": true
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "XXXXXXX" ,
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/xml"
},
"httpContentType": "application/xml",
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "Xid~#~char",
"name": "FirstName~#~char"
},
"disableDeletedAccounts": true
}
}
}
}
03/22/2024 08:20 AM
Hi @mirani,
This attribute should match the attribute you have defined in connection json
"connection": "Basic"
03/22/2024 08:22 AM
Disclaimer - This is an AI generated response and feedback will be used to fine-tune.
The error message you're encountering during the import operation suggests that the REST connector is experiencing difficulties properly importing users/accounts. Based on the ImportAccountEntJSON you've shared, let's address a few common issues and adjustments that might help resolve the problem.
Connection Name: The "connection": "Basic" parameter should match the exact name of the connection you've created in Saviynt. If "Basic" is not the name of your connection, replace it with the correct one.
Authorization Header: Ensure the ${connection.accessToken} token is correctly set up in your connection configuration. This token should be correctly generating the "Authorization: Basic [Base64 encoded user:password]" header. If you are manually managing tokens, ensure the Base64 encoding is correct and includes both the username and password.
URL Placeholder: The "url": "XXXXXXXXXXX" is a placeholder. Make sure you replace it with the actual API endpoint URL from which you are trying to import accounts.
Content Type: You've specified "Accept": "application/xml" and "httpContentType": "application/xml", which means the REST API is expected to respond with XML content. Confirm that the endpoint indeed responds with XML, and your system is equipped to parse XML responses. If the response is in JSON or another format, you will need to adjust these headers accordingly.
Error Handling and Debugging: Since you're unable to attach the log file here, review the job log details within the Saviynt interface for specific error messages. Common issues include authentication errors, incorrect URLs, or mismatches in the expected response format.
Key Field and Mapping: In your colsToPropsMap, you've mapped "accountID": "Xid~#~char" and "name": "FirstName~#~char". Ensure these fields exist in the XML response and are named exactly as expected. The mapping should reflect the actual structure of the XML response. If "Xid" and "FirstName" are placeholders, replace them with the actual XML tags from the response.
List Field: You've left "listField": "" empty. If the accounts are nested within a list or a specific tag in the XML response, you need to specify this tag in listField to correctly parse the accounts.