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

REST Connector - pullObjectsByRest - responseStatusCode ::401 Error

Saviynt_Savvy
Regular Contributor
Regular Contributor

Hi all,

I have configured a REST Connector for Phoenix account import.
When I run the Application Data Import Job, the job is running successfully but not able to import any accounts/access to the Endpoint.

Saviynt_Savvy_0-1714479481903.png

In the log viewer I see a few records with responsestatuscode=401 ("pullObjectsByRest - responseStatusCode ::401") as shown in the screenshot below.

Saviynt_Savvy_1-1714479624512.png

I am using the below Connection JSON and ImportAccountEnt JSON for the account & access Import.

Connection JSON:
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"url": "https://192.xxx.xx.xx/phoenixapi/xxxxxx/sandbox/connect/token",
"httpMethod": "POST",
"httpParams": {
"grant_type": "client_credentials",
"client_secret": "xxxxxxxxxxxxxxxxxxx",
"client_id": "xxxx"
},
"httpHeaders": {
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"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>"
}
}
}

ImportAccountEnt JSON:
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty4",
"activeStatus": [
"true"
],
"deleteLinks": false,
"accountThresholdValue": 1000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false,
"deleteAccEntForActiveAccounts": true
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://192.xxx.xx.xx/phoenixapi/xxxx/sandbox/Admin/Global/Employees/search",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "result",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "employeeId~#~char",
"name": "employeeName~#~char",
"status": "status~#~char",
"customproperty1": "userName~#~char",
"customproperty2": "emplClassCode~#~char",
"customproperty3": "tellerClassCode~#~char",
"customproperty4": "ptid~#~char",
"customproperty5": "status~#~char",
"customproperty6": "networkAcct~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"listField": "result",
"idPath": "emplClassCode",
"keyField": "entitlementID"
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Secuirty Group": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://192.xxx.xx.xx/phoenixapi/xxxx/sandbox/Admin/Global/Employees/Classes/search",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "resultID",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "emplClassCode~#~char",
"entitlement_value": "emplClassCode~#~char",
"description": "description~#~char",
"status": "status~#~char"
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

Please suggest where the modifications are required in the JSONs.

Thanks & Regards,
SaviyntSavvy

4 REPLIES 4

NM
Valued Contributor
Valued Contributor

Hi @Saviynt_Savvy , add retryresponsestatus field in connection json with value 401.

You will get the right name from rest connector doc.

Saviynt_Savvy
Regular Contributor
Regular Contributor

Hi @NM ,
Thanks for the reply.
I have added the below section in the connection json.
"retryFailureStatusCode": [401],
But when I run the Application Data Import Job, the job got failed and showing the below error in the Job log detail.

Saviynt_Savvy_0-1714481916317.png

Please let me know if required to make any other validations.

Thanks  & Regards,
SaviyntSavvy 

NM
Valued Contributor
Valued Contributor

@Saviynt_Savvy can you share postman screenshot of token endpoint with response.

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.