Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Basic Auth-REST-ImportAccountEntJSON

Suresh1
New Contributor
New Contributor

Hello Team,

I am trying to configure a REST connector for one of the applications in our environment which uses REST API's with Basic Authentication.

Connection is successful with below connection json.

{
"authentications":{
"acctAuth":{
"authType":"basic",
"errorPath":"error.code",
"maxRefreshTryCount":5,
"tokenResponsePath":"access_token",
"properties":{
"userName":"<Username>",
"password":"<Password>"
},
"authError":[
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"retryFailureStatusCode":[]
}
}

But facing issues with ImportAccountEntJSON, I was able to get the accounts recon to Saviynt successfully but when i'm trying to import the access, getting 200 response in the logs but entitlements are not imported to Saviynt.

Below is the Json i'm using for the same.

{
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "accountThresholdValue": 2000,
      "inactivateAccountsNotInFile": true
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "<URL>",
          "httpContentType": "application/json",
          "httpMethod": "GET",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "*/*"
          }
        },
        "listField": "Resources",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "userName~#~char",
          "customproperty1": "name.familyName~#~char",
          "customproperty2": "name.givenName~#~char",
          "customproperty3": "emails.value~#~char",
  "customproperty4": "active~#~char",
  "customproperty5": "displayName~#~char",
"status": "active~#~bool"
        }
      }
    }
  },
  "acctEntMappings": {
"Groups": {
"listPath": "",
"idPath": "value",
"keyField": "entitlementID"
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Groups": {
"entTypeOrder": 0,
"call": {
"call2": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "<URL>",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "*/*"
}
},
"listField": "resources",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "resources.id~#~char",
"entitlement_value": "resources.displayName~#~char",
"customproperty1": "resources.id~#~char"
}
 
}
}
}
}
},
"acctEntParams": {
    "connection": "acctAuth",
    "entTypes": {
      "Groups": {
        "call": {
          "call3": {
            "callOrder": 0,
            "stageNumber": 0,
            "processingType": "acctToEntMapping"
          }
        }
      }
    }
  }
}

Below is the logs for the same post running the access import

Suresh1_0-1707328548245.png

Please help me understand if i'm missing something here.

Regards,

Suresh V.

 

15 REPLIES 15

rushikeshvartak
All-Star
All-Star

Share postman response screenshot 

Please share curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak ,

Below is the postman response for GET Groups

Suresh1_0-1707392990955.png

Below is the CURL command for the same operation

curl --location '<URL>' \
--header 'Authorization: Basic MaasQyMzktNjk2ZSaLWEyOTctOTQ1N2Q1NjI5OGIzOkRTLWVCSWxYbnJGQ01tMC5RTlViUkE5Sqwedacasddfa=' \
--header 'Cookie: JSESSIONID=D6A83889B0C2AFF404F021B0C7D4075124C'

 

 

Vedanth-BK
Regular Contributor
Regular Contributor

Hi @Suresh1 

The object list size is null in the debug logs means that the list field or the traversing path to entID is incorrect. Please share the response 



Thank you
Vedanth B.K

Hi @Vedanth-BK ,

Here is the Response from postman

Suresh1_1-1707393209771.png

 

Vedanth-BK
Regular Contributor
Regular Contributor

Hi @Suresh1 
Please try with the below json

{
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "accountThresholdValue": 2000,
      "inactivateAccountsNotInFile": true
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "<URL>",
          "httpContentType": "application/json",
          "httpMethod": "GET",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "*/*"
          }
        },
        "listField": "Resources",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "userName~#~char",
          "customproperty1": "name.familyName~#~char",
          "customproperty2": "name.givenName~#~char",
          "customproperty3": "emails.value~#~char",
          "customproperty4": "active~#~char",
          "customproperty5": "displayName~#~char",
          "status": "active~#~bool"
        }
      }
    }
  },
  "acctEntMappings": {
    "Groups": {
      "listPath": "",
      "idPath": "value",
      "keyField": "entitlementID"
    }
  },
  "entitlementParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "entTypes": {
      "Groups": {
        "entTypeOrder": 0,
        "call": {
          "call1": {
            "callOrder": 0,
            "stageNumber": 0,
            "http": {
              "url": "<URL>",
              "httpContentType": "application/json",
              "httpMethod": "GET",
              "httpHeaders": {
                "Authorization": "${access_token}",
                "Accept": "application/json"
              }
            },
            "listField": "Resources",
            "keyField": "entitlementID",
            "colsToPropsMap": {
              "entitlementID": "id~#~char",
              "entitlement_value": "displayName~#~char",
              "customproperty1": "id~#~char"
            }
          }
        }
      }
    }
  },
  "acctEntParams": {
    "connection": "acctAuth",
    "entTypes": {
      "Groups": {
        "call": {
          "call3": {
            "callOrder": 0,
            "stageNumber": 0,
            "processingType": "acctToEntMapping"
          }
        }
      }
    }
  }
}
Thank you
Vedanth B.K

Hi @Vedanth_BK 

With the provided Json i am getting 406

Suresh1_0-1707397467603.png

 

Vedanth-BK
Regular Contributor
Regular Contributor

please try with the below 

{
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "accountThresholdValue": 2000,
      "inactivateAccountsNotInFile": true
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "<URL>",
          "httpContentType": "application/json",
          "httpMethod": "GET",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "*/*"
          }
        },
        "listField": "Resources",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "userName~#~char",
          "customproperty1": "name.familyName~#~char",
          "customproperty2": "name.givenName~#~char",
          "customproperty3": "emails.value~#~char",
          "customproperty4": "active~#~char",
          "customproperty5": "displayName~#~char",
          "status": "active~#~bool"
        }
      }
    }
  },
  "acctEntMappings": {
    "Groups": {
      "listPath": "",
      "idPath": "value",
      "keyField": "entitlementID"
    }
  },
  "entitlementParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "entTypes": {
      "Groups": {
        "entTypeOrder": 0,
        "call": {
          "call1": {
            "callOrder": 0,
            "stageNumber": 0,
            "http": {
              "url": "<URL>",
              "httpContentType": "application/json",
              "httpMethod": "GET",
              "httpHeaders": {
                "Authorization": "${access_token}",
                "Accept": "*/*"
              }
            },
            "listField": "Resources",
            "keyField": "entitlementID",
            "colsToPropsMap": {
              "entitlementID": "id~#~char",
              "entitlement_value": "displayName~#~char",
              "customproperty1": "id~#~char"
            }
          }
        }
      }
    }
  },
  "acctEntParams": {
    "connection": "acctAuth",
    "entTypes": {
      "Groups": {
        "call": {
          "call3": {
            "callOrder": 0,
            "stageNumber": 0,
            "processingType": "acctToEntMapping"
          }
        }
      }
    }
  }
}
Thank you
Vedanth B.K

Hi @Vedanth-BK ,

Thank you, this worked and brought all the entitlements to Saviynt but Account to entitlement mappings didnt happen. Did i miss anything here  ?

 

Regards,

Suresh V.

Vedanth-BK
Regular Contributor
Regular Contributor

Hi @Suresh1 

Please add customproperty31 in colstoProps of account params and run the account  and access recon job

"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"

Validate if the cp31 is populated with the group information. If you do see values, please share the account's API response to validate acctEntMappings





Thank you
Vedanth B.K

Hi @Vedanth-BK ,

I have mapped CP31 as suggested above and ran the account and access recons. But got empty value mapped to CP31.

Suresh1_0-1707837582026.png

Below is the GET accounts response 

Suresh1_1-1707837794611.png

We are having groups array and Value as the object in it. below is our acctEntMappings 

"acctEntMappings": {
"Groups": {
"listPath": "groups",
"idPath": "value",
"keyField": "entitlementID"
}
},

Vedanth-BK
Regular Contributor
Regular Contributor

please share the complete json 

Thank you
Vedanth B.K

Here it is...

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountThresholdValue": 2000,
"inactivateAccountsNotInFile": true
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "<URL>",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "*/*"
}
},
"listField": "Resources",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "userName~#~char",
"customproperty1": "name.familyName~#~char",
"customproperty2": "name.givenName~#~char",
"customproperty3": "emails.value~#~char",
"customproperty4": "active~#~char",
"customproperty5": "displayName~#~char",
"status": "active~#~bool",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
}
},
"acctEntMappings": {
"Groups": {
"listPath": "groups",
"idPath": "value",
"keyField": "entitlementID"
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Groups": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "<URL>",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "*/*"
}
},
"listField": "Resources",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "displayName~#~char",
"customproperty1": "id~#~char"
}
}
}
}
}
},
"acctEntParams": {
"connection": "acctAuth",
"entTypes": {
"Groups": {
"call": {
"call3": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "acctToEntMapping"
}
}
}
}
}
}

Vedanth-BK
Regular Contributor
Regular Contributor

Hi @Suresh1 

The acctEntMappings  was placed outside the accountParams. I've corrected the syntax. Please check with the below Json

{
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "accountThresholdValue": 2000,
      "inactivateAccountsNotInFile": true
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "<URL>",
          "httpContentType": "application/json",
          "httpMethod": "GET",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "*/*"
          }
        },
        "listField": "Resources",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "userName~#~char",
          "customproperty1": "name.familyName~#~char",
          "customproperty2": "name.givenName~#~char",
          "customproperty3": "emails.value~#~char",
          "customproperty4": "active~#~char",
          "customproperty5": "displayName~#~char",
          "status": "active~#~bool",
          "customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
        }
      }
    },
    "acctEntMappings": {
      "Groups": {
        "listPath": "groups",
        "idPath": "value",
        "keyField": "entitlementID"
      }
    }
  },
  "entitlementParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "entTypes": {
      "Groups": {
        "entTypeOrder": 0,
        "call": {
          "call1": {
            "callOrder": 0,
            "stageNumber": 0,
            "http": {
              "url": "<URL>",
              "httpContentType": "application/json",
              "httpMethod": "GET",
              "httpHeaders": {
                "Authorization": "${access_token}",
                "Accept": "*/*"
              }
            },
            "listField": "Resources",
            "keyField": "entitlementID",
            "colsToPropsMap": {
              "entitlementID": "id~#~char",
              "entitlement_value": "displayName~#~char",
              "customproperty1": "id~#~char"
            }
          }
        }
      }
    }
  },
  "acctEntParams": {
    "processingType": "acctToEntMapping"
  }
}

 

Thank you
Vedanth B.K

This Worked, thank you @Vedanth-BK 

Manu269
All-Star
All-Star

In the config json add :

{
  "showLogs": true
}

 Also can you try validating via postman what is the response?

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.