"The token was not valid.","friendlyErrorType":"Error","errorData"

Team,

Has anyone come across this error:

"The token was not valid.","friendlyErrorType":"Error","errorData"

I have followed the instructions in the documentation but I still get the error. Any thoughts?

Hi @mgrant

Can you show us your custom authentication configuration?

That is response from your target source. can you post on explain your auth model here.

Hi Tyler and Chelsea

Thanks for chiming in. Here you go my friend. Attempting to set up a Hot Docs Advanced Webservice. It works in Postman but does not in ISC.



{
“description”: “H”,
“owner”: {
“type”: “IDENTITY”,
“id”: “[REDACTED_ID]”,
“name”: “J”
},
“cluster”: {
“type”: “CLUSTER”,
“id”: “[REDACTED]”,
“name”: “VAx”
},
“accountCorrelationConfig”: null,
“accountCorrelationRule”: null,
“managerCorrelationMapping”: null,
“managerCorrelationRule”: null,
“beforeProvisioningRule”: null,
“schemas”: [
{
“configuration”: {},
“type”: “CONNECTOR_SCHEMA”,
“id”: “[REDACTED]”,
“name”: “account”
},
{
“configuration”: {},
“type”: “CONNECTOR_SCHEMA”,
“id”: “[REDACTED]”,
“name”: “group”
}
],
“passwordPolicies”: null,
“features”: [
“AUTHENTICATE”,
“UNLOCK”
],
“type”: “Web Services”,
“connector”: “web-services-angularsc”,
“connectorClass”: “sailpoint.connector.webservices.WebServicesConnector”,
“connectorAttributes”: {
“clientCertificate”: null,
“deltaAggregationEnabled”: false,
“accesstoken”: null,
“throwProvBeforeRuleException”: true,
“connectionType”: “direct”,
“client_id”: null,
“numPartitionThreads”: null,
“enableProvisioningFeature”: false,
“password”: null,
“client_secret”: null,
“clientKeySpec”: null,
“saml_headers_to_exclude”: null,
“sourceConnected”: true,
“saml_headers”: null,
“private_key”: null,
“version”: “v2”,
“labels”: [
“standard”
],
“slpt-source-diagnostics”: “{"connector":"web-services-angularsc","status":"SOURCE_STATE_UNCHECKED_SOURCE_NO_ACCOUNTS","healthy":false,"healthcheckDisabled":true,"healthcheckCount":270,"lastHealthcheck":1773745170647,"statusChanged":1773151297969,"redactions":{"sourceId":"[REDACTED]"}}”,
“formPath”: null,
“refresh_token”: null,
“cloudCacheUpdate”: 1773708911618,
“saml_request_body”: null,
“authenticationMethod”: “No Auth”,
“httpCookieSpecsStandard”: “true”,
“connectorName”: “Web Services”,
“enableStatus”: null,
“since”: “2026-03-10T14:01:37.969Z”,
“status”: “SOURCE_STATE_UNCHECKED_SOURCE_NO_ACCOUNTS”,
“supportsDeltaAgg”: “true”,
“resourceOwnerUsername”: null,
“oAuthJwtHeader”: null,
“customaccesstoken_CA”: null,
“enableHasMore”: false,
“isGetObjectRequiredForPTA”: true,
“timeoutInSeconds”: “60”,
“genericWebServiceBaseUrl”: “https://[REDACTED]/api/rest/v2.0”,
“resourceOwnerPassword”: null,
“connectionParameters”: [
{
“httpMethodType”: “POST”,
“pagingInitialOffset”: 0,
“sequenceNumberForEndpoint”: “1”,
“uniqueNameForEndPoint”: “Get-Token”,
“rootPath”: “$”,
“body”: {
“jsonBody”: “{\n  "ClientName": "[REDACTED]",\n  "PrincipalName": "svc",\n  "PrincipalPassword": "$application.principalPassword_CA$"\n}”,
“bodyFormat”: “raw”
},
“customAuthUrl”: “https://[REDACTED]/auth/Authorize/ServicePrincipalLogIn”,
“paginationSteps”: null,
“responseCode”: [
“2**”
],
“resMappingObj”: {
“customaccesstoken_CA”: “$.accessToken”
},
“contextUrl”: null,
“pagingSize”: 50,
“curlEnabled”: false,
“header”: {
“Accept”: “application/json”,
“Content-Type”: “application/json”
},
“operationType”: “Custom Authentication”,
“xpathNamespaces”: null,
“parentEndpointName”: null
},
{
“httpMethodType”: “GET”,
“pagingInitialOffset”: 0,
“sequenceNumberForEndpoint”: “2”,
“uniqueNameForEndPoint”: “Get-Users”,

i guess this is the response after authentication right? I am looking for how are you getting the auth token. if you can show screenshots and some explanation of the flow.

Ah - here you go - below is the source

And this is Postman

ok. in your custom auth http auth, catch the response with response mapping as :

schmaattribute : accessToken

attribute path:

lets assume this path will be “accessToken” if the response is simple for example like this :

{

“accessToken“: “abababababbabnnmmjhdhvh“

}

then create an other http operation for test connection.

give your base context and etc. there in header pass the above as :

header name: “Authorization“

header value: “Bearer $application.accessToken$“

note: in the above, <$application.accessToken$> refers to the response mapping from your custom auth operation.

everytime you run the test connection, it will create a new session by calling your custom auth and gets new token.

lets try this then we can move to the next operation.