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

We are using this below recon json. Postman is giving the results but saviynt is throwing 400 error.

UdaySai
New Contributor
New Contributor
Json-
{
"globalSettings": {
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX"
},
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"doNotChangeIfFailed": true,
"statusAndThresholdConfig": {
"activeStatus": ["true"],
"deleteLinks": true,
"accountThresholdValue": 500,
"correlateInactiveAccounts": false,
"inactivateAccountsNotInFile": true,
"deleteAccEntForActiveAccounts": true
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxx/services/rest/query/v1/suiteql?limit=1000",
"httpHeaders": {
"Authorization": "${access_token}",
"prefer": "transient"
},
"httpContentType": "application/json; charset=UTF-8",
"httpMethod": "POST",
"httpParams": {
"q": "SELECT employee.id, employee.entityid, employee.email, employee.firstname, employee.lastname, employee.isinactive, employee.rolesforsearch, employee.subsidiary FROM employee"
},
"successResponses": {
"statusCode": [200]
}
},
"keyField": "accountID",
"listField": "items",
"statusConfig": {
"inactive": "T",
"active": "F"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "email~#~char",
"displayName": "entityid~#~char",
"status": "isinactive~#~char",
"customproperty6": "subsidiary~#~char",
"customproperty31": "#CONST#${String rolesforsearch = response?.rolesforsearch; if(rolesforsearch == null) return '{}' else {def roles = ['Roles':['entIds':rolesforsearch?.split(', '),'keyField':'entitlementID']]; new groovy.json.JsonBuilder(roles)?.toString()}}~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${if(response?.completeResponseMap?.hasMore==false){return null}; for(link in response?.completeResponseMap?.links){if(link.rel == 'next')return link.href}; return null}"
}
}
}
}
},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"doNotChangeIfFailed": true,
"entTypes": {
"subsidiary": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxx/services/rest/query/v1/suiteql?limit=1000",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "*/*",
"prefer": "transient"
},
"httpContentType": "application/json;charset=UTF-8",
"httpMethod": "POST",
"httpParams": {
"q": "SELECT id, fullname, isinactive FROM subsidiary WHERE isinactive='F'"
},
"successResponses": {
"statusCode": [200]
}
},
"listField": "items",
"keyField": "entitlementID",
"statusConfig": {
"inactive": "T",
"active": "F"
},
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "fullname~#~char",
"displayname": "fullname~#~char",
"status": "isinactive~#~char"
},
"disableDeletedEntitlements": true,
"pagination": {
"nextUrl": {
"nextUrlPath": "${if(response?.completeResponseMap?.hasMore==false){return null}; for(link in response?.completeResponseMap?.links){if(link.rel == 'next')return link.href}; return null}"
}
}
}
}
},
"Role": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxx/services/rest/query/v1/suiteql?limit=1000",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "*/*",
"prefer": "transient"
},
"httpContentType": "application/json;charset=UTF-8",
"httpMethod": "POST",
"httpParams": {
"q": "SELECT id, name, isinactive FROM role WHERE isinactive='F')"
},
"successResponses": {
"statusCode": [200]
}
},
"listField": "items",
"keyField": "entitlementID",
"statusConfig": {
"inactive": "T",
"active": "F"
},
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"displayname": "name~#~char",
"status": "isinactive~#~char"

},
"disableDeletedEntitlements": true,
"pagination": {
"nextUrl": {
"nextUrlPath": "${if(response?.completeResponseMap?.hasMore==false){return null}; for(link in response?.completeResponseMap?.links){if(link.rel == 'next')return link.href}; return null}"
}
}
}
}
}
}
},
"acctEntParams": {
"connection": "userAuth",
"entTypes": {
"Roles": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "acctToEntMapping"
}
}
}
}
}
 }
 
 
 
 
Error:
 
Error -
2023-10-12 19:16:32,036 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - EntitlementType 'Role' for Endpoint 'Fittle-OracleNetSuite' found with EntitlementTypekey - 1290
2023-10-12 19:16:32,036 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - processAccountsFullBySequentialAndIterative - params.origParams.stageNumber : null
2023-10-12 19:16:32,037 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - callStageNumber : 0
2023-10-12 19:16:32,037 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - callStageNumber: 0
2023-10-12 19:16:32,037 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - stageNumber: null
2023-10-12 19:16:32,037 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - processAccountsFullBySequentialAndIterative - Not Multitrigger call
2023-10-12 19:16:32,039 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Inside processAccountsFinal.
2023-10-12 19:16:32,039 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Inside processAccounts.
2023-10-12 19:16:32,201 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Inside pullObjectsByRest
2023-10-12 19:16:32,201 [quartzScheduler_Worker-9] DEBUG rest.RestUtilService - Got showLogs = true
2023-10-12 19:16:32,201 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Calling Webservice Url - https://7453737-sb2.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=1000 with httpParams - [q:SELECT employee.id, employee.entityid, employee.email, employee.firstname, employee.lastname, employee.isinactive, employee.rolesforsearch, employee.subsidiary FROM employee]
2023-10-12 19:16:32,201 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - Enter getTimeOutConfig
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - connectionType: REST
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - connectionTimeoutConfig before guardRail validation: [connectionTimeout:10, readTimeout:60, writeTimeout:60, retryWait:2, retryCount:3]
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - Final connectionTimeoutConfig after guardRail validation: [connectionTimeout:10, readTimeout:60, retryCount:3, retryWait:2]
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - isFipsEnabled = false
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - getHttpClient - sslParams : null
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - getHttpClient - proxyParams : null
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - getHttpClient - sslSocketFactory : null
2023-10-12 19:16:32,203 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - setting connection timeout to 10 seconds and request timeout to 60 seconds
2023-10-12 19:16:32,204 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - getHttpClient - HttpClientBuilder.create().build() called.
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestUtilService - Got showLogs = true
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Got Webservice API Response: [headers:[Content-Type: application/vnd.oracle.resource+json; type=error; charset=UTF-8, Content-Length: 327, X-N-OperationId: f68dd1be-7e83-489c-bd7d-74bb7e7b90a6, NS_RTIMER_COMPOSITE: 1752663105:706172746E6572733130332E70726F642D6672612D6575332E636F72652E6E732E696E7465726E616C:80, Strict-Transport-Security: max-age=31536000, Pragma: No-Cache, Cache-Control: No-Cache, Expires: 0, WWW-Authenticate: Bearer realm="7453737_SB2", error="invalid_token", error_description="Invalid login attempt.", P3P: CP="CAO PSAa OUR BUS PUR", Vary: User-Agent, Date: Thu, 12 Oct 2023 19:16:32 GMT, Connection: close, Akamai-GRN: 0.5d4e4e68.1697138192.c44f943a], responseText:{"type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1","title":"Bad Request","status":400,"o:errorDetails":[{"detail":"Invalid login attempt. For more details, see the Login Audit Trail in the NetSuite UI at Setup > Users/Roles > User Management > View Login Audit Trail.","o:errorCode":"INVALID_LOGIN"}]}
, cookies:[], statusCode:400]
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestUtilService - pullObjectsByRest - responseStatusCode ::400
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Entered getResponseHeaders method
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - responseError : null
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - isAuthError: false
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - pullObjectsByRest - responseMap.size : 4
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - pullObjectsByRest - objectList.size : null
2023-10-12 19:16:32,410 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService  - Inside importAccountsFull:persistAccounts, pptTypeSep : ~#~
 
Error -
2023-10-12 19:16:32,036 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - EntitlementType 'Role' for Endpoint 'Fittle-OracleNetSuite' found with EntitlementTypekey - 1290
2023-10-12 19:16:32,036 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - processAccountsFullBySequentialAndIterative - params.origParams.stageNumber : null
2023-10-12 19:16:32,037 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - callStageNumber : 0
2023-10-12 19:16:32,037 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - callStageNumber: 0
2023-10-12 19:16:32,037 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - stageNumber: null
2023-10-12 19:16:32,037 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - processAccountsFullBySequentialAndIterative - Not Multitrigger call
2023-10-12 19:16:32,039 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Inside processAccountsFinal.
2023-10-12 19:16:32,039 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Inside processAccounts.
2023-10-12 19:16:32,201 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Inside pullObjectsByRest
2023-10-12 19:16:32,201 [quartzScheduler_Worker-9] DEBUG rest.RestUtilService - Got showLogs = true
2023-10-12 19:16:32,201 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Calling Webservice Url - https://7453737-sb2.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=1000 with httpParams - [q:SELECT employee.id, employee.entityid, employee.email, employee.firstname, employee.lastname, employee.isinactive, employee.rolesforsearch, employee.subsidiary FROM employee]
2023-10-12 19:16:32,201 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - Enter getTimeOutConfig
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - connectionType: REST
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - connectionTimeoutConfig before guardRail validation: [connectionTimeout:10, readTimeout:60, writeTimeout:60, retryWait:2, retryCount:3]
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - Final connectionTimeoutConfig after guardRail validation: [connectionTimeout:10, readTimeout:60, retryCount:3, retryWait:2]
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - isFipsEnabled = false
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - getHttpClient - sslParams : null
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - getHttpClient - proxyParams : null
2023-10-12 19:16:32,202 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - getHttpClient - sslSocketFactory : null
2023-10-12 19:16:32,203 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - setting connection timeout to 10 seconds and request timeout to 60 seconds
2023-10-12 19:16:32,204 [quartzScheduler_Worker-9] DEBUG services.HttpClientUtilityService - getHttpClient - HttpClientBuilder.create().build() called.
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestUtilService - Got showLogs = true
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Got Webservice API Response: [headers:[Content-Type: application/vnd.oracle.resource+json; type=error; charset=UTF-8, Content-Length: 327, X-N-OperationId: f68dd1be-7e83-489c-bd7d-74bb7e7b90a6, NS_RTIMER_COMPOSITE: 1752663105:706172746E6572733130332E70726F642D6672612D6575332E636F72652E6E732E696E7465726E616C:80, Strict-Transport-Security: max-age=31536000, Pragma: No-Cache, Cache-Control: No-Cache, Expires: 0, WWW-Authenticate: Bearer realm="7453737_SB2", error="invalid_token", error_description="Invalid login attempt.", P3P: CP="CAO PSAa OUR BUS PUR", Vary: User-Agent, Date: Thu, 12 Oct 2023 19:16:32 GMT, Connection: close, Akamai-GRN: 0.5d4e4e68.1697138192.c44f943a], responseText:{"type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1","title":"Bad Request","status":400,"o:errorDetails":[{"detail":"Invalid login attempt. For more details, see the Login Audit Trail in the NetSuite UI at Setup > Users/Roles > User Management > View Login Audit Trail.","o:errorCode":"INVALID_LOGIN"}]}
, cookies:[], statusCode:400]
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestUtilService - pullObjectsByRest - responseStatusCode ::400
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Entered getResponseHeaders method
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - responseError : null
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - isAuthError: false
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - pullObjectsByRest - responseMap.size : 4
2023-10-12 19:16:32,409 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - pullObjectsByRest - objectList.size : null
2023-10-12 19:16:32,410 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService  - Inside importAccountsFull:persistAccounts, pptTypeSep : ~#~
 
Postman:
 
UdaySai_0-1697564129675.png

 

UdaySai_1-1697564149130.png

 

 
8 REPLIES 8

sk
All-Star
All-Star

@UdaySai : Issue is with authentication, Please check your connectionJSON, If possible please share your ConnectionJSON and sample postman output for connection to validate the same


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

UdaySai
New Contributor
New Contributor

Provisioning is working fine using the same connection json.

{
    "authentications": {
        "userAuth": {
            "authType": "oauth2",
            "url": "https://xxx/services/rest/auth/oauth2/v1/token",
            "httpMethod": "POST",
            "httpParams": {
                "grant_type": "refresh_token",
                "refresh_token": "xxxx"
            },
            "httpHeaders": {
                "contentType": "application/x-www-form-urlencoded",
                "Authorization": "Basic xxx"
            },
            "expiryError": "INVALID_SESSION_ID",
            "authError": [
                "INVALID_SESSION_ID"
            ],
            "timeOutError": "Read timed out",
            "retryFailureStatusCode": [
                401,
                403
            ],
            "errorPath": "errorCode",
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "access token",
            "tokenType": "Bearer",
            "accessToken": "Bearer abcd"
        }
    }
}

 

Postman 

UdaySai_0-1697618611315.pngUdaySai_1-1697618656333.png

 

@UdaySai : Try below JSON and see

{
    "authentications": {
        "userAuth": {
            "authType": "oauth2",
            "url": "https://xxx/services/rest/auth/oauth2/v1/token",
            "httpMethod": "POST",
            "httpParams": {
                "grant_type": "refresh_token",
                "refresh_token": "xxxx"
            },
            "httpHeaders": {
                "contentType": "application/x-www-form-urlencoded",
                "Authorization": "Basic xxx"
            },
            "expiryError": "INVALID_SESSION_ID",
            "authError": [
                "INVALID_SESSION_ID"
            ],
            "timeOutError": "Read timed out",
            "retryFailureStatusCode": [
                401,
                403
            ],
            "errorPath": "errorCode",
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "access_token",
            "tokenType": "Bearer",
            "accessToken": "Bearer abcd"
        }
    }
}

Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

UdaySai
New Contributor
New Contributor

Getting the same error -

2023-10-18 16:03:41,698 [quartzScheduler_Worker-5] DEBUG services.HttpClientUtilityService  - connectionType: REST
2023-10-18 16:03:41,698 [quartzScheduler_Worker-5] DEBUG services.HttpClientUtilityService  - connectionTimeoutConfig before guardRail validation: [connectionTimeout:10, readTimeout:60, writeTimeout:60, retryWait:2, retryCount:3]
2023-10-18 16:03:41,698 [quartzScheduler_Worker-5] DEBUG services.HttpClientUtilityService  - Final connectionTimeoutConfig after guardRail validation: [connectionTimeout:10, readTimeout:60, retryCount:3, retryWait:2]
2023-10-18 16:03:41,698 [quartzScheduler_Worker-5] DEBUG services.HttpClientUtilityService  - isFipsEnabled = false
2023-10-18 16:03:41,698 [quartzScheduler_Worker-5] DEBUG services.HttpClientUtilityService  - getHttpClient - sslParams : null
2023-10-18 16:03:41,698 [quartzScheduler_Worker-5] DEBUG services.HttpClientUtilityService  - getHttpClient - proxyParams : null
2023-10-18 16:03:41,699 [quartzScheduler_Worker-5] DEBUG services.HttpClientUtilityService  - getHttpClient - sslSocketFactory : null
2023-10-18 16:03:41,700 [quartzScheduler_Worker-5] DEBUG services.HttpClientUtilityService  - setting connection timeout to 10 seconds and request timeout to 60 seconds
2023-10-18 16:03:41,700 [quartzScheduler_Worker-5] DEBUG services.HttpClientUtilityService  - getHttpClient - HttpClientBuilder.create().build() called.
2023-10-18 16:03:41,835 [quartzScheduler_Worker-5] DEBUG rest.RestUtilService  - Got showLogs = true
2023-10-18 16:03:41,835 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService  - Got Webservice API Response: [headers:[Content-Type: application/vnd.oracle.resource+json; type=error; charset=UTF-8, Content-Length: 327, X-N-OperationId: 3e6a0892-789c-476a-b288-f22e1047e08a, NS_RTIMER_COMPOSITE: 366926454:706172746E6572733130332E70726F642D6672612D6575332E636F72652E6E732E696E7465726E616C:80, Strict-Transport-Security: max-age=31536000, Pragma: No-Cache, Cache-Control: No-Cache, Expires: 0, WWW-Authenticate: Bearer realm="7453737_SB2", error="invalid_token", error_description="Invalid login attempt.", P3P: CP="CAO PSAa OUR BUS PUR", Vary: User-Agent, Date: Wed, 18 Oct 2023 16:03:41 GMT, Connection: close, Akamai-GRN: 0.446adc17.1697645021.8504e841], responseText:{"type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1","title":"Bad Request","status":400,"o:errorDetails":[{"detail":"Invalid login attempt. For more details, see the Login Audit Trail in the NetSuite UI at Setup > Users/Roles > User Management > View Login Audit Trail.","o:errorCode":"INVALID_LOGIN"}]}
, cookies:[], statusCode:400]
2023-10-18 16:03:41,835 [quartzScheduler_Worker-5] DEBUG rest.RestUtilService  - pullObjectsByRest - responseStatusCode ::400
2023-10-18 16:03:41,836 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService  - Entered getResponseHeaders method
2023-10-18 16:03:41,836 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService  - responseError : null
2023-10-18 16:03:41,836 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService  - isAuthError: false

@UdaySai : Hey I missed to add "httpContentType": "application/x-www-form-urlencoded". Can you try below. If still didn't work can you try hard coding accessToken with actual token and see if that works

 

{
    "authentications": {
        "userAuth": {
            "authType": "oauth2",
            "url": "https://xxx/services/rest/auth/oauth2/v1/token",
            "httpMethod": "POST",
            "httpParams": {
                "grant_type": "refresh_token",
                "refresh_token": "xxxx"
            },
            "httpHeaders": {
                "contentType": "application/x-www-form-urlencoded",
                "Authorization": "Basic xxx"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "expiryError": "INVALID_SESSION_ID",
            "authError": [
                "INVALID_SESSION_ID"
            ],
            "timeOutError": "Read timed out",
            "retryFailureStatusCode": [
                401,
                403
            ],
            "errorPath": "errorCode",
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "access_token",
            "tokenType": "Bearer",
            "accessToken": "Bearer abcd"
        }
    }
}

 

 

Another way to validate is please include testConnectionParams block in ConnectionJSON so that upon clicking save & test connection it will validate if authentication is working fine or not


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

navneetv
Regular Contributor II
Regular Contributor II

Hi @UdaySai I am also working on  RemoveAccessJSON . still, I am unable to figure out how to remove the role from the account.

this is what I tried so far but no luck. If have built the  RemoveAccessJson, could you please share the removeAccessJson or help me 

{
"call": [
{
"name": "Netsuite_Roles",
"connection": "userAuth",
"http": {
"url": "https://<endURL>/services/rest/query/v1/suiteql?limit=1000",
"httpHeaders": {
"Authorization": "${access_token}",
"prefer": "transient"
},
"httpContentType": "application/json",
"httpMethod": "POST",
"httpParams": {
"q": "SELECT employee.id, employee.entityid, employee.email, employee.firstname, employee.lastname, employee.isinactive, employee.rolesforsearch, employee.subsidiary FROM employee WHERE employee.email= ${user.email}"
},
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401
]
}
}
},
{
"name": "Netsuite_Roles",
"connection": "userAuth",
"http": {
"url": "https://<endURL>/services/rest/record/v1/employee/${account.accountID}?replace=roles",
"httpHeaders": {
"Authorization": "${access_token}",
"prefer": "transient"
},
"httpMethod": "PATCH",
"httpParams": "{ \"giveaccess\": true,\"Roles.items.selectedrole.id\":[${List roleNameList = response.Netsuite_Roles1.items[0].rolesforsearch.collect{it.toString()}; roleNameList.remove(entitlementValue.entitlement_value.toString());String rolesStr = roleNameList.toString().replace('[','').replace(']','').replace('\"','');return rolesStr;}]}",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401
]
}
}
}
]
}

navneetv
Regular Contributor II
Regular Contributor II

Hi @UdaySai  JSON which I pasted in above. it is not working. Might be, you have marked the solution by mistake. I need your help. if you have removeAccessJSOn could you please share?

Sivagami
Valued Contributor
Valued Contributor

@naveengs / @UdaySai - Can you share the working jsons for Netsuite for different usecase? Provisioning as well as recon?