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

ImportAccountEntJSON for Basic Authorization - REST

mirani
New Contributor III
New Contributor III

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.

 

10 REPLIES 10

Raghu
All-Star
All-Star

it is rest connector right , can do below changes let me know
"Authorization": "${accessToken}",
"Accept": "application/json"
"httpContentType": "application/json"


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

mirani
New Contributor III
New Contributor III

Did the asked changes, got the same error.
@rushikeshvartak I have shared the log file with you.

Maybe that can help!

rushikeshvartak
All-Star
All-Star

Please additional logs after clicking Job attribute name from Job details page.


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

NM
Esteemed Contributor
Esteemed Contributor

Hi @mirani,

add this.

"Authorization": "${access_token}",
"Accept": "application/json"
"httpContentType": "application/json"


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

mirani
New Contributor III
New Contributor III

I am finding this in logs.
"Connection name provided in accountJSON is not found"

The connection details are correct though.

Please share both jsons / connections json and import json


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

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]

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
      }
    }
  }
}


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

NM
Esteemed Contributor
Esteemed Contributor

Hi @mirani,

This attribute should match the attribute you have defined in connection json

"connection": "Basic"


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

Falcon
Saviynt Employee
Saviynt Employee

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.