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

Anaplan REST Connection Issue

adecastro1
New Contributor III
New Contributor III

Hi All,

We are trying to integrate Anaplan using REST connector and I am stuck on the ConnectionJSON as it doesn't seem that I am retrieving a token. We are using the CA Certificate authentication method: Use CA certificate authentication | Anapedia (anaplan.com) 

I have it working in Postman with the curl like this:

curl --location 'https://auth.anaplan.com/token/authenticate' \
--header 'Authorization: CACertificate <certificate>' \
--header 'Content-Type: application/json' \
--data '{
"encodedData": "<encoded data>",
"encodedSignedData": "<encoded signed data>"
}'

The response looks like this:

adecastro1_0-1716224713405.png

I was unsure which authentication type fore this and have tried with several but here is an example of the ConnectionJSON that I have tried:

{
"authentications": {
"auth": {
"authType": "oauth2",
"url": "https://auth.anaplan.com/token/authenticate",
"httpParams": {
"encodedData": "<encoded data>",
"encodedSignedData": "<encoded signed data>"
},
"httpHeaders": {
"Content-Type": "application/json",
"Authorization": "CACertificate <ca certificate>"
},
"authError": [
"InvalidAuthenticationToken"
],
"httpMethod": "POST",
"httpContentType": "application/x-www-form-urlencoded",
"errorPath": "status",
"maxRefreshTryCount": 5,
"tokenResponsePath": "tokenInfo.tokenValue",
"tokenType": "Bearer",
"retryFailureStatusCode": [
401
],
"accessToken": "token"
}
}
}

The log view seems like it is just trying 5 times to get a token and fails:

adecastro1_1-1716224732889.png

Any suggestion on how to format the ConnectionJSON for this type of authenication? Thanks.

16 REPLIES 16

rushikeshvartak
All-Star
All-Star

Look for section SSL Parameter in document Developers-Handbook this parameter is supported even in Import JSONs.


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

Thanks for the fast responses, when looking at the SSL Parameter section it looks like it is to point to a certificate file but in this case I am just passing the certificate in PEM format in the header. This is a static value.

You need to upload certificate in Connector files in File Directory and use it.

refer https://forums.saviynt.com/t5/identity-governance/rest-connector-unable-to-use-connection-binding-ob...


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

NM
Honored Contributor III
Honored Contributor III

Hi @adecastro1 , is certificate a constant value?


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

adecastro1
New Contributor III
New Contributor III

Yes, this is a constant value

NM
Honored Contributor III
Honored Contributor III

Hi @adecastro1 , were you able to resolve it?


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

adecastro1
New Contributor III
New Contributor III

Hi All, I am still not having any luck, I have tried uploading the certificate into certificate management and connector files but I'm not sure if it should be necessary for this setup. I do not need to reference the certificate for each call, we just use it in the header of the authentication call to get a token, then the token is used for all subsequent calls.

To narrow down problem if you pass connection json call in create account json does it works ?


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

adecastro1
New Contributor III
New Contributor III

Thanks all for the assistance, the issue ended up just being the httpContentType needed to be application/json instead of application/x-www-form-urlencoded

To help others can you share working connection json masking sensitive information 


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

NM
Honored Contributor III
Honored Contributor III

Hi @adecastro1 , can you share your connection json?


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

adecastro1
New Contributor III
New Contributor III

Sure, here is the working connection JSON:

{
"authentications": {
"auth": {
"authType": "oauth2",
"url": "https://auth.anaplan.com/token/authenticate",
"httpParams": {
"encodedData": "<encoded data>",
"encodedSignedData": "<encoded signed data>"
},
"httpHeaders": {
"Content-Type": "application/json",
"Authorization": "CACertificate <cert pem value>"
},
"authError": [
"InvalidAuthenticationToken"
],
"httpMethod": "POST",
"httpContentType": "application/json",
"errorPath": "response.status",
"maxRefreshTryCount": 5,
"tokenResponsePath": "tokenInfo.tokenValue",
"tokenType": "Bearer",
"retryFailureStatusCode": [
401
],
"accessToken": "Bearer abcd"
}
}
}

NM
Honored Contributor III
Honored Contributor III

Hi @adecastro1 , is the certificate like a private key? Can you send the certificate format .. mask the value


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

adecastro1
New Contributor III
New Contributor III

We configured the authentication based on the Anaplan documentation: Use CA certificate authentication | Anapedia (anaplan.com) it is the base 64 encoded certificate in PEM format

NM
Honored Contributor III
Honored Contributor III

@adecastro1 , one last thing did you add it it in connector file or just directly mentioned the certificate in connection json


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

adecastro1
New Contributor III
New Contributor III

I did not end up needing to add it in the connector files or in the certificate keystore, it is only mentioned in the http header.