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

Could not decode token- Invalid JWS

Harish7
New Contributor II
New Contributor II

Hi,

I am getting the below error when i import users from connection.

Logs:

2022-08-08 07:44:07,704 [quartzScheduler_Worker-2] DEBUG rest.RestProvisioningService - responseError : Could not decode token: The token "AiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS5wZXJzb25pby5kZS92MS9hdXRoIiwiaWF0IjoxNjQ4MTM2NjE2LCJleHAiOjE2NDgyMjMwMTYsIm5iZiI6MTY0ODEzNjYxNiwianRpIjoiODg1ZmJlOGMtNjEwOS00MjZmLTk4OTctODkyNDhiZDZhYTUzIiwic3ViIjoiT1RFek5EZ3haakprWlRoaE1tRTNOalk1TTJZM01ETXkiLCJwcnYiOiI3YTE5OTQ5OTlkMTgxZGVlYTY4ZTQzMDRiMzM0NmU3OGY4MzhlY2I3Iiwic2NvcGUiOlsiZW1wbG95ZWVzOnJlYWQiLCJlbXBsb3llZXM6d3JpdGUiLCJhdHRlbmRhbmNlczpyZWFkIiwiYXR0ZW5kYW5jZXM6d3JpdGUiLCJhYnNlbmNlczpyZWFkIiwiYWJzZW5jZXM6d3JpdGUiXX0.spZItpUd25CqAnONj1FXjQ79lnGTvuoPPSUCJiPm9EE" is an invalid JWS

Could you please suggest me what we can do to avoid this error?

Best regards

Harish

5 REPLIES 5

Belwyn
Saviynt Employee
Saviynt Employee

Hi @Harish7 

Could you please provide us a bit more information like 

1. What type of connection is used? 

2. Please provide us the Connection JSON used? 

3. Have you tried the same(API call) in postman with the token seen in the logs? If yes can share the response? 

Regards, 
Belwyn.

Harish7
New Contributor II
New Contributor II

Hi @Belwyn,

Thanks for the reply.

I am using the REST connection.

UserImportJSON:

{
"connection": "userAuth",
"url": "https://api.COMPANYNAME.de/v1/company/employees",
"httpMethod": "GET",
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded",
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"statuskey": "attributes.status.value~#~char",
"customproperty1": "attributes.status.value~#~char",
"companyname": "attributes.subcompany.value.attributes.name~#~char",
"departmentname": "attributes.department.value.attributes.name~#~char",
"email": "attributes.email.value~#~char",
"firstname": "attributes.first_name.value~#~char",
"lastname": "attributes.last_name.value~#~char",
"jobcode": "attributes.position.value~#~char",
"jobcodedesc": "attributes.position.value~#~char",
"startdate": "attributes.hire_date.value~#~char",
"termdate": "attributes.termination_date.value~#~char",
"enddate": "attributes.last_working_day.value~#~char",
"location": "attributes.office.value.attributes.name~#~char",
"employeeid": "attributes.dynamic_5737.value~#~char",
"employeetype": "attributes.dynamic_6743.value~#~char",
"systemusername": "attributes.id.value~#~char",
"manager": "attributes.supervisor.value.attributes.id.value"
},
"statusConfig": {
"active": [
"active",
"onboarding"
],
"inactive": "inactive"
},
"errorCode": "401",
"errorCodePath": "errorCode",
"userResponsePath": "data"
}

Yes i have tried in postman with the token found in logs and i got the same error response.

Screenshot 2022-08-09 at 15.53.50.png

Saviynt Logs for the import Job run:

2022-08-09 13:02:23,588 [quartzScheduler_Worker-4] DEBUG jobs.UserImportJob - START UserImportJob
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG jobs.UserImportJob - UserImportJob ID - 403554
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG jobs.UserImportJob - Start call externalConnectionCallService
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - START IMPORT USER USING EXTERNAL CONNECTION
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=tabDetail Value=daily::1__01:33:00
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=userNotInFeedAction Value=NOACTION
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=UpdateUserJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=SendOtpJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=USERSOURCE Value=2
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=zeroDayProvisioning Value=TRUE
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=ENDPOINTS_FILTER Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=userOperationsAllowed Value=CREATE,UPDATE
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=ImportUserJSON Value={
"connection": "userAuth",
"url": "https://api.companyname.de/v1/company/employees",
"httpMethod": "GET",
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded",
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"statuskey": "attributes.status.value~#~char",
"customproperty1": "attributes.status.value~#~char",
"companyname": "attributes.subcompany.value.attributes.name~#~char",
"departmentname": "attributes.department.value.attributes.name~#~char",
"email": "attributes.email.value~#~char",
"firstname": "attributes.first_name.value~#~char",
"lastname": "attributes.last_name.value~#~char",
"jobcode": "attributes.position.value~#~char",
"jobcodedesc": "attributes.position.value~#~char",
"startdate": "attributes.hire_date.value~#~char",
"termdate": "attributes.termination_date.value~#~char",
"enddate": "attributes.last_working_day.value~#~char",
"location": "attributes.office.value.attributes.name~#~char",
"employeeid": "attributes.dynamic_5737.value~#~char",
"employeetype": "attributes.dynamic_6743.value~#~char",
"systemusername": "attributes.id.value~#~char",
"manager": "attributes.supervisor.value.attributes.id.value"
},
"statusConfig": {
"active": [
"active",
"onboarding"
],
"inactive": "inactive"
},
"errorCode": "401",
"errorCodePath": "errorCode",
"userResponsePath": "data"
}
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=EnableAccountJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=PasswdPolicyJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=termUserLimit Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=TicketStatusJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=ConfigJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=AddAccessJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=RemoveFFIDAccessJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=UpdateAccountJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=userStatusConfig Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=jobnamelabel Value=User Import via a Connection (UserImportJob)
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=generateEmail Value=FALSE
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=ImportAccountEntJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=AddFFIDAccessJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=CreateAccountJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=connectionname Value=Personio
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=CreateTicketJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=checkRules Value=TRUE
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=buildUserMap Value=TRUE
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=exporttosavcloud Value=FALSE
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=generateSystemUsername Value=FALSE
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=userDefaultSavRole Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=cronexpression Value=0 33 01 1/1 * ? *
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=ValidateOtpJSON Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=org.grails.plugins.quartz.grailsJobName Value=UserImportJob
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=STATUS_THRESHOLD_CONFIG Value=
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=importsavconnect Value=FALSE
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=connectionid Value=2
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=connectiontype Value=REST
2022-08-09 13:02:23,655 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=endpointsToAssociateOrphanAccounts Value=
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=RemoveAccountJSON Value=
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=ChangePassJSON Value=
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=updateUser Value=harish.gandepalli.ext@commpanyname.de
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=zeroDayLimit Value=
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=MODIFYUSERDATAJSON Value={
"ADDITIONALTABLES": {
"USERS": "SELECT username,employeeid FROM USERS"
},
"COMPUTEDCOLUMNS": [
"manager",
"username",
"leavestatus",
"displayname",
"customproperty13"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA SET username = CASE WHEN email != '' THEN email ELSE systemusername END;",
"UPDATE NEWUSERDATA SET leavestatus = CASE WHEN customproperty1 = 'leave' THEN 1 ELSE 0 END;",
"UPDATE NEWUSERDATA N1 LEFT JOIN NEWUSERDATA N2 ON N1.MANAGER = N2.SYSTEMUSERNAME SET N1.manager = N2.username;",
"UPDATE NEWUSERDATA SET displayname = CONCAT_WS(' ', firstname, lastname);",
"UPDATE NEWUSERDATA SET customproperty13 = case when employeeid != '' then 'Internal' else 'External' end;"
]
}
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=RemoveAccessJSON Value=
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=DisableAccountJSON Value=
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=userReconcillationField Value=systemUserName
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=jobtriggername Value=HRIMPORT
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=fullorincremental Value=full
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Start Import Users
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Enter initializeConnectionForUserImport
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Exit initializeConnectionForUserImport
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - calling getUsersData method to hit Import User API
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Inside getUsersData
2022-08-09 13:02:23,656 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - connection: userAuth
2022-08-09 13:02:23,756 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Adding connectionParamMap to jsonMap for ssl :
2022-08-09 13:02:23,776 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Inside pullObjectsByRest
2022-08-09 13:02:23,776 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService -
2022-08-09 13:02:23,776 [quartzScheduler_Worker-4] DEBUG services.HttpClientUtilityService - isFipsEnabled = false
2022-08-09 13:02:23,776 [quartzScheduler_Worker-4] DEBUG services.HttpClientUtilityService - getHttpClient - sslParams : null
2022-08-09 13:02:23,776 [quartzScheduler_Worker-4] DEBUG services.HttpClientUtilityService - getHttpClient - proxyParams : null
2022-08-09 13:02:23,776 [quartzScheduler_Worker-4] DEBUG services.HttpClientUtilityService - getHttpClient - sslSocketFactory : null
2022-08-09 13:02:23,843 [quartzScheduler_Worker-4] DEBUG services.HttpClientUtilityService - getHttpClient - HttpClientBuilder.create().build() called.
2022-08-09 13:02:24,368 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService -
2022-08-09 13:02:24,369 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - pullObjectsByRest - responseStatusCode ::401
2022-08-09 13:02:24,369 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Entered getResponseHeaders method
2022-08-09 13:02:24,369 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - responseError : Could not decode token: The token "AiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS5wZXJzb25pby5kZS92MS9hdXRoIiwiaWF0IjoxNjQ4MTM2NjE2LCJleHAiOjE2NDgyMjMwMTYsIm5iZiI6MTY0ODEzNjYxNiwianRpIjoiODg1ZmJlOGMtNjEwOS00MjZmLTk4OTctODkyNDhiZDZhYTUzIiwic3ViIjoiT1RFek5EZ3haakprWlRoaE1tRTNOalk1TTJZM01ETXkiLCJwcnYiOiI3YTE5OTQ5OTlkMTgxZGVlYTY4ZTQzMDRiMzM0NmU3OGY4MzhlY2I3Iiwic2NvcGUiOlsiZW1wbG95ZWVzOnJlYWQiLCJlbXBsb3llZXM6d3JpdGUiLCJhdHRlbmRhbmNlczpyZWFkIiwiYXR0ZW5kYW5jZXM6d3JpdGUiLCJhYnNlbmNlczpyZWFkIiwiYWJzZW5jZXM6d3JpdGUiXX0.spZItpUd25CqAnONj1FXjQ79lnGTvuoPPSUCJiPm9EE" is an invalid JWS
2022-08-09 13:02:24,369 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - isAuthError: false
2022-08-09 13:02:24,369 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - pullObjectsByRest - responseMap.size : 2
2022-08-09 13:02:24,369 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - pullObjectsByRest - objectList.size : null
2022-08-09 13:02:24,369 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - got empty objectList
2022-08-09 13:02:24,369 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Exit getUsersData
2022-08-09 13:02:24,369 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - processing usersData size:: 0
2022-08-09 13:02:24,369 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Start Process Users
2022-08-09 13:02:24,370 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - userFieldsMetadata: statuskey,customproperty1,companyname,departmentname,email,firstname,lastname,jobcode,jobcodedesc,startdate,termdate,enddate,location,employeeid,employeetype,systemusername,manager
2022-08-09 13:02:24,370 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - targetSystemFieldsMetadata:: attributes.status.value,attributes.status.value,attributes.subcompany.value.attributes.name,attributes.department.value.attributes.name,attributes.email.value,attributes.first_name.value,attributes.last_name.value,attributes.position.value,attributes.position.value,attributes.hire_date.value,attributes.termination_date.value,attributes.last_working_day.value,attributes.office.value.attributes.name,attributes.dynamic_5737.value,attributes.dynamic_6743.value,attributes.id.value,attributes.supervisor.value.attributes.id.value
2022-08-09 13:02:24,370 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - End Process Users
2022-08-09 13:02:24,370 [quartzScheduler_Worker-4] DEBUG rest.RestUtilService - Writing job history to import logs.
2022-08-09 13:02:24,370 [quartzScheduler_Worker-4] DEBUG rest.RestUtilService - Number of log entries to be written : 0
2022-08-09 13:02:24,382 [https-jsse-nio-443-exec-98] DEBUG domain.FlatViewJobcontrolController - ecmjobIdQuery .. select max(eij.JOBID) as 'JobId' from EcmImportJob eij where eij.TRIGGERNAME in (select qrt.TRIGGER_NAME from qrtz_triggers qrt) group by eij.TRIGGERNAME
2022-08-09 13:02:24,398 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - End Import Users

Thanks in advance.

Best regards

Harish

Hello @Harish7,

Are you able to connect to the application via Postman ? If not, I would suggest you to reach out to the application team/owners to help with you getting the right request/response on the Postman, including the tokens.

Post that you can work to translate that in the Saviynt REST Connector.

 

 

Regards,
Avinash Chhetri

As per screenshot of postman this is error from target application. Hence please connect with application team to fix issue.


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

He has said that he used the token from the logs on postman, hence unsure if it is working directly from Postman to begin with.

 

 

Regards,
Avinash Chhetri