We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Account is not created in external source after access request has been fulfilled

niklasfa
New Contributor II
New Contributor II

Hello everyone,
good morning, good evening,

I've been working with Saviynt for about two months and I'm currently configuring a REST connection for the first time in order to import some accounts into Saviynt trough an external API.

I was trying to configure the CreateAccountJSON inside my connection as well, in order to post new accounts to my external system whenever a access request in Saviynt is fulfilled. Unfortunately, no accounts are created when running any create account task or WSRETRY job.

Here is what I did:

1. Created access request for another using. Requested roles within this request as well.
2. Switched to pending requests section, approved the requests just created
3. Successfully completed the created tasks manually and ran WSRETRY job as well
4. Checked the external system - no account has been created
5. Checked the log file - found no issues.

This is the content of CreateAccountJSON:

 

{
  "accountIdPath": "accountName",
  "dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
  "call": [
    {
      "name": "call1",
      "connection": "reqresTest",
      "showResponse": true,
      "url": "https://api.nikiras.de/v1/create-account.php",
      "httpMethod": "POST",
      "httpParams": "{\"name\": \"${user.name}\", \"endpointname\": \"Reqres\", \"entitlementValue\":\"123\"}",
      "httpHeaders": {
        "Authorization": "${access_token}"
      },
      "httpContentType": "application/json"
    }
  ]
}

 

Log file is also attached (I ran the tasks + WSRETRY job and then exported the log of the last 5 mins).

You are welcome to request further information if required.

Thank you, have a nice day!

Niklas

2 REPLIES 2

kishorekumarmb
Saviynt Employee
Saviynt Employee

Hi Niklasfa,

       First thanks for writing the query in forum. Can you please answer the following questions?

 

  1. Using the api " https://api.nikiras.de/v1/create-account.php” are you able to successfully create the account in external system using postman with same credentials used in Saviynt connection? If so please share the complete payload along with response in forum.
  2.  Usually connection name (json) in Saviynt will be “acctAuth” or “userAuth” but in your post in can see the name as “reqresTest”. Did you explicitly named in ConnectionJSON as “reqresTest”? Use the same name used in connection for calling other provisioning/de provisioning /import.
  3. Use the “successResponses” mapping in json for proper error handling.

 

Refer the below documents for more details and examples of rest connector.

https://docs.saviyntcloud.com/bundle/REST-v2021x/page/Content/Developers-Handbook.htm#top

 

Thanks

Kishore

Hi Kishore,

thanks for your answer.

1. I'm able to successfully create the account in external system using postman. Please see the payload below. The API doesn't require any type of authentication, it's public and only for testing purposes.

niklasfa_0-1688543807284.png

2. I've explicitly named in ConnectionJSON as "reqresTest", yes. Please have a look below.

{
  "authentications": {
    "reqresTest": {
      "authType": "basic",
      "url": "https://api.nikiras.de/v1/accounts.php",
      "httpMethod": "POST",
      "httpParams": {
        "username": "<Username>",
        "password": "<Password>"
      },
      "httpHeaders": {
        "contentType": "application/x-www-form-urlencoded"
      },
      "httpContentType": "application/x-www-form-urlencoded",
      "expiryError": "ExpiredAuthenticationToken",
      "authError": [
        "InvalidAuthenticationToken",
        "AuthenticationFailed",
        "FAILURE",
        "INVALID_SESSION_ID"
      ],
      "timeOutError": "Read timed out",
      "errorPath": "errors.type",
      "maxRefreshTryCount": 5,
      "tokenResponsePath": "sessionId",
      "tokenType": "Bearer",
      "accessToken": "<access token>"
    }
  }
}

3. Thanks for the hint, I will do so.

Niklas