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

Error in Importing account through REST connector

Jaya
Regular Contributor II
Regular Contributor II

Hi,

We are trying to establish a REST connection, for that we're using API key based connectivity approach.

But when we are trying to import account in saviynt it is getting failed & giving some error.

Connection Json-

{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://xxxx.com",
"httpMethod": "POST",
"httpParams": {
"username": "Saviyntdevuser",
"apiKey": "xxxxxxxxxxxxxxxxx"
},

"httpHeaders": {
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"authError": [
"Unable to authenticate the client",
"Invalid OAuth token Bearer"
],
"retryFailureStatusCode": [
401,
403
],
"errorPath": "",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"cleanUpTextContent": true,
"tokenType": "Bearer",
"accessToken": "Bearer abcd"
}
}
}

 

ImportAcctEntJson-

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxx.com/user/users",
"httpHeaders": {
"Authorization": "${apiKey}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "records",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "email~#~char",
"customproperty1":"first~#~char",
"customproperty2":"last~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.next_page==null?null:response.completeResponseMap.next_page}"
}
}
}
}
}
}

Connectivity is working fine through postman and we are getting required results. So please suggest some solution for this.

Thanks
Jaya Karothia
2 REPLIES 2

pmahalle
All-Star
All-Star

Hi @Jaya ,

Can you try to pass the username and apiKey in URL as query parameter instead of httpParams. Keep httpParams blank, as given below:

{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://xxxx.com?username=Saviyntdevuser&apiKey=xxxxxxxxxxxxxxxxx",
"httpMethod": "POST",
"httpParams": {
}


Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept As Solution to help other who may have a same problem. Give Kudos 🙂

Jaya
Regular Contributor II
Regular Contributor II

Hi Paddy,

That also didn't work.

In postman we are following below format(for importing groups), how we specify same in below json

Jaya_0-1689756202533.png

Jaya_1-1689756267644.png

{"entitlementParams": {
"connection": "userAuth",
"processingType": "acctToEntMapping",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://sandbox.resolver.com/user/group",
"httpHeaders": {
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "Result",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char"
},
"disableDeletedEntitlements": true
}
}
}
}

 

Thanks
Jaya Karothia