Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

importaccountEnt json throwing 401 error

Joon
Regular Contributor II
Regular Contributor II

Hello All,

I was trying to import users using API but encountered verify-failed(401) error.

The API for target's DEV environment works fine.

but the API for target's Prod returns 401 when I tried to import accounts meanwhile Headers, configs and anything is same with the DEV I tried and the weird thing is It is working properly from Postman.

Does anyone have a similar experience with this?

error code: [JWT strings must contain exactly 2 period characters]

3 REPLIES 3

SB
Saviynt Employee
Saviynt Employee

Can you share Connection and Import JSON you are using


Regards,
Sahil

Joon
Regular Contributor II
Regular Contributor II

Hello Sahil,

Please find the code below. we don't need ConnectionJson because API token is hardcoded in Import json. so i put any connection we have. 

{
	"globalSettings": {
		"dateFormat": "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
	},
	"accountParams": {
		"connection": "acctAuth",
		"processingType": "SequentialAndIterative",
		"statusAndThresholdConfig": {
			"deleteLinks": false,
			"accountThresholdValue": 100,
			"correlateInactiveAccounts": false,
			"inactivateAccountsNotInFile": false,
			"deleteAccEntForActiveAccounts": true
		},
		"call": {
			"call1": {
				"callOrder": 0,
				"stageNumber": 0,
				"http": {
					"url": "https://api-gateway.coupang.net/v2/providers/parcel_web/apis/api/v1/account/users",
					"httpHeaders": {
						"X-CAG-Authorization": "AG_CONSUMER_TOKEN access-key=-",
	"Content-Type": "application/json"
					},
					"httpContentType": "application/json",
					"httpMethod": "GET"
				},
				"listField": "data",
				"keyField": "accountID",
				"statusConfig": {
				          "active": "true",
				          "inactive": "false"
				        },
				"colsToPropsMap": {
					"accountID": "userId~#~char",
					"name": "loginId~#~char",
					"customproperty1":"userId~#~char",
					"customproperty2":"name~#~char",
					"customproperty3":"employeeNumber~#~char",
					"status": "enable~#~boolean",
					"customproperty4":"employStatus~#~char",
					"customproperty5":"deptName~#~char",
					"customproperty6":"phoneNumber~#~char"
					
				},
				"pagination": {
					"nextUrl": {
						"nextUrlPath": "${response.completeResponseMap.page.afterUrl == null?null:response.completeResponseMap.page.afterUrl}"
					}
				}
			}
		}
	}
}

 

 

SB
Saviynt Employee
Saviynt Employee

This does appear to be auth error. Can you compare the jsons directly from the Dev env with the one you are using in Prod to check for any diff. 

This might require additional troubleshooting if its not working even when using the working jsons from Dev env. I would suggest you to open a support ticket.


Regards,
Sahil