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

Create Account JSON-"Access token is null".

PuspanjaliM
New Contributor II
New Contributor II

Hi Team,

We are trying to integrate the rest of the application, which uses authentication by providing an API key and tenant ID in the header of the request and not using any authorization header.

I referred to a few posts and created the connection JSON and Create Account JSON as below.

However, while provisioning, Saviynt is giving the below error: "Access token is null".

 

Connection JSON

{
"authentications": {
"acctAuth": {
"httpHeaders": {
"Content-Type": "application/json",
"x-api-key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"x-tenant-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5
}
}
}

Create Account JSON

{
"accountIdPath": "call1.message.id",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"httpMethod": "PATCH",
"httpParams": "{\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"email\":\"${user.email}\",\"expiresAt\":\"2006-10-25 14:51:38\",\"customFields\": [{\"id\":\"emp-number\",\"value\":\"${user.employeeid}\"},{\"id\":\"emp-type\",\"value\":\"${user.employeetype}\"},{\"id\":\"home-cost-centre\",\"value\":\"${user.customproperty3}\"},{\"id\":\"emp-location\",\"value\":\"${user.customproperty6}\"},{\"id\":\"expiresAtReason\",\"value\":\"\"}],\"country\":\"BHR\",\"timezone\":\"London/Europe\",\"language\":\"en_GB\"}",
"httpHeaders": {
"Content-Type": "application/json",
"x-api-key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"x-tenant-id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
},
{
"name": "call2",
"connection": "userAuth",
"url": "https://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"httpMethod": "PATCH",
"httpParams": "{\"managerId\":\"${managerAccount.username}\",\"jobAssignmentId\":\"${user.employeeid}\",\"jobAssignmentName\":\"${user.customproperty31}\",\"managerJobAssignmentId\":\"${managerAccount.employeeid}\",\"organisationFrameworkId\":\"OF1\",\"organisationLevelId\":\"104\",\"positionFrameworkId\":\"PF1\",\"positionLevelId\":\"104\",\"startDate\":\"${user.customproperty7}\",\"endDate\":\"${user.enddate}\",\"isOrganisationManager\" : \"false\"}",
"httpHeaders": {
"Content-Type": "application/json",
"x-api-key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"x-tenant-id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
}
]
}

When Saviynt is trying to create the user in Application. from logs we are receiving below error

Screenshot 2023-10-31 131033.png

I feel I'm receiving this error because of the connection. Could you please help me find a way to achieve this without any authorization code?

 

2 REPLIES 2

SumathiSomala
All-Star
All-Star

@PuspanjaliM could you please correct the connectname in your JSONs .

Connection JSON

{
"authentications": {
"acctAuth": {

 

Create Account JSON

"connection": "userAuth",

.

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

Hi Sumathi,

Thanks I updated the Create Account JSON.

However I'm receiving the same error(Access Token is null)

Create Account JSON.

{
"accountIdPath": "call1.message.id",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://,
"httpMethod": "PATCH",
"httpParams": "{\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"email\":\"${user.email}\",\"expiresAt\":\"2006-10-25 14:51:38\",\"customFields\": [{\"id\":\"emp-number\",\"value\":\"${user.employeeid}\"},{\"id\":\"emp-type\",\"value\":\"${user.employeetype}\"},{\"id\":\"home-cost-centre\",\"value\":\"${user.customproperty3}\"},{\"id\":\"emp-location\",\"value\":\"${user.customproperty6}\"},{\"id\":\"expiresAtReason\",\"value\":\"\"}],\"country\":\"BHR\",\"timezone\":\"London/Europe\",\"language\":\"en_GB\"}",
"httpHeaders": {
"Content-Type": "application/json",
"x-api-key": "",
"x-tenant-id": ""
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
},
{
"name": "call2",
"connection": "acctAuth",
"url": "https://,
"httpMethod": "PATCH",
"httpParams": "{\"managerId\":\"${managerAccount.username}\",\"jobAssignmentId\":\"${user.employeeid}\",\"jobAssignmentName\":\"${user.customproperty31}\",\"managerJobAssignmentId\":\"${managerAccount.employeeid}\",\"organisationFrameworkId\":\"OF1\",\"organisationLevelId\":\"104\",\"positionFrameworkId\":\"PF1\",\"positionLevelId\":\"104\",\"startDate\":\"${user.customproperty7}\",\"endDate\":\"${user.enddate}\",\"isOrganisationManager\" : \"false\"}",
"httpHeaders": {
"Content-Type": "application/json",
"x-api-key": "",
"x-tenant-id": ""
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
}
]
}

 

 

ERROR

2023-10-31T13:57:46+05:30-ecm-worker-services.ArsTaskService-quartzScheduler_Worker-7-srl7r-DEBUG-Calling rest createAccount with Sec System - LearningPool and tasklist - [PUSPANJALIM:[com.saviynt.ecm.task.ArsTasks : 39753]]
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-Entering RestProvisioningService : createAccount
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-initializing Provisioning connection
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-email: puspanjalim@motabilityoperations.co.uk
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-Calling createNewUser
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-arsTasks.provisioningComments null
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-arsTasks?.requestAccessKey: null
 
2023-10-31T13:57:46+05:30-ecm-worker-services.SaviyntCommonUtilityService-quartzScheduler_Worker-7-srl7r-DEBUG-Sql = Select epattr from Endpoint_attributes epattr where epattr.endpoints.id = :epid and epattr.requestType=1 and epattr.defaultvalue is not null and epattr.defaultvalue <> ''
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-Entered generatePasswordFromJsonOrRule
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-Generating password policy from security system/default policy
 
2023-10-31T13:57:46+05:30-ecm-worker-services.SaviyntCommonUtilityService-quartzScheduler_Worker-7-srl7r-DEBUG-PolicyRule is null
 
2023-10-31T13:57:46+05:30-ecm-worker-services.SaviyntCommonUtilityService-quartzScheduler_Worker-7-srl7r-DEBUG-minLen: 10, maxLen: 15, noOfCAPSAlpha: 1, noOfDigits: 2, noOfSplChars: 2
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-Exit generatePasswordFromJsonOrRule
 
2023-10-31T13:57:46+05:30-ecm-worker-services.SaviyntCommonUtilityService-quartzScheduler_Worker-7-srl7r-DEBUG-Enter getStandardBindingVariable
 
2023-10-31T13:57:46+05:30-ecm-worker-services.SaviyntCommonUtilityService-quartzScheduler_Worker-7-srl7r-DEBUG-Exit getStandardBindingVariable
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-Total Call: 2
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-connection: acctAuth
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-ERROR-Access Token is null..
 
2023-10-31T13:57:46+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-connection: acctAuth
 
2023-10-31T13:57:47+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-ERROR-Access Token is null..
 
2023-10-31T13:57:47+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-Response size: 0
 
2023-10-31T13:57:47+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-Task Response: null
 
2023-10-31T13:57:47+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-accountId: null
 
2023-10-31T13:57:47+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-accountResponseMap: null
 
2023-10-31T13:57:47+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-taskResult: false
 
2023-10-31T13:57:47+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-isEntitlementOnly: false
 
2023-10-31T13:57:47+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-DEBUG-taskResult:: false
 
2023-10-31T13:57:47+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-srl7r-ERROR-Error while creating account - PUSPANJALIM removing tasks from the list