Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Unable to Pass the Access Token to Import and other JSONs in Rest connector

Mohit_Sanka
New Contributor III
New Contributor III

Hi Team,

We are connecting to Topdesk application which is using a basic authentication generating a token every time we hit the URL. And we need to pass this token to other JSON like Import by concatenating "Token id=" in headers.

Example: Token id = "abs-asbsd".

Below are the JSON we have tested to perform the import accounts.

Connection JSON:

{
"authentications": {
"acctAuth": {
"authType": "Basic",
"url": "https://topdesk/tas/api/login/operator",
"httpMethod": "GET",
"httpParams": {},
"httpHeaders": {},
"httpContentType": "text/html",
"properties": {
"userName": "",
"password": ""
},
"expiryError": "Couldn't authenticate you",
"authError": [
"Couldn't authenticate you",
401,
403,
500,
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"timeOutError": "Read timed out",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"errorPath": "error",
"maxRefreshTryCount": 5,
"tokenResponsePath": "",
"tokenType": "TOKEN id=",
"accessToken": "TOKEN id=\"abcd\""
}
}
}

 

Import Account JSON:

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://topdesk/tas/api/persons",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "\"${access_token.substring(1,access_token.length()-1)}\"",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "networkLoginName~#~char"
}
}
}
}
}

With this configuration we are getting 401 unauthorized error as Token id is not getting concatenated in the import JSON call.

 

Kindly let us know how we can pass the access token by concatenating the Token id="".

 

Thanks & Regards,

Mohit.

4 REPLIES 4

Mohit_Sanka
New Contributor III
New Contributor III

"Authorization": "\"${access_token.substring(1,access_token.length()-1)}\"",

for authorization, in import json we also tried to pass it as ${access_token}.

rushikeshvartak
All-Star
All-Star

Token id is not supported OOTB. raise idea ticket for enhancement. 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Mohit_Sanka
New Contributor III
New Contributor III

Hi Rushikesh,

So passing Token Id concatenated with access token is not supported in Rest connector?

Example: Token id = "asds-basdbsa"

Can you please confirm once again.

 

Regards,

Mohit.

No


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.