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

Import User JSON for Rest Connector

AshishDas
Regular Contributor II
Regular Contributor II

Hi We are trying to pull user data from the Source of truth into Saviynt, for which the connection json shows successful. However, user import throws an error. We are using url and subscription key to fetch the data.

If we hardcode the subscription key in user import json it works fine. However, when we use the refrence of the subscription key from connection Json into UserImport Json it throws and error as invalid subscription key. below is the connection json and user import json.

Connection Json:

{
"authentications": {
"acctAuth": {
"authType": "Basic",
"url": "****************************************8",
"httpMethod": "POST",
"httpParams": {},
"httpHeaders": {
"Ocp-Apim-Subscription-Key": "${access_token}"
},
"httpContentType": "text/html",
"properties": {
},
"expiryError": "Couldn't authenticate you",
"authError": [
"Couldn't authenticate you"
],
"timeOutError": "Read timed out",
"errorPath": "error",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Basic",
"accessToken": "<Subscription key value>",
"testConnectionParams": {
"http": {
"url": "****************************************************",
"httpHeaders": {
"Ocp-Apim-Subscription-Key": "${access_token}"

},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"successResponse": [],
"successResponsePath": "",
"errors": [
"Couldn't authenticate you"
],
"errorPath": "error"
}
}
}
}

UserImport JSON:

{
"connection": "acctAuth",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"url": "**************************************",
"httpMethod": "GET",
"httpHeaders": {
"Ocp-Apim-Subscription-Key": "${access_token}"
},
"userResponsePath": "employee",
"colsToPropsMap": {
"username": "personNumber~#~char",
"firstname": "firstName~#~char",
"lastname": "lastName~#~char"
}
}

Error:

AshishDas_0-1692680075513.png

This works fine when using the hardcoded subscription key in UserImportJson. But we do not wish to display the subscription key in UserImport Json because of security concerns.

 

Am I missing something?

1 REPLY 1

AshishDas
Regular Contributor II
Regular Contributor II

Changed the auth type from Basic to OAuth2 and added authHeaderName and it worked