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

Import Account Failing

IAM
Regular Contributor
Regular Contributor

Everything seems to match what I have perfectly in Postman. I even removed ${access_token} and put in a newly generated access token and I still get error code 401. Can someone see something I am not seeing?

ImportAccountEntJSON:

 

{
  "showLogs": false,
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "successResponses": {
      "statusCode": [
        200,
        201,
        202,
        203,
        204,
        205
      ]
    },
    "unsuccessResponses": 401,
    "doNotChangeIfFailed": true,
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "https://mycompany.palantirfoundry.com/multipass/api/search/v2/search",
          "httpContentType": "application/json",
          "httpMethod": "POST",
              "httpParams": "{\"attributeFilters\": {}, \"query\": \"\", \"pageSize\": 1000000, \"pageStart\": 0, \"principalTypes\": [\"USER\"]}",
          "httpHeaders": {
                "Content-Type": "application/json",
                "Authorization": "${access_token}"
          }
        },
        "listField": "values",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "username~#~char",
          "displayname": "username~#~char",
          "customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
        }
      }
    }
  },
  "entitlementParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "entTypes": {
      "Roles": {
        "entTypeOrder": 0,
        "call": {
          "call1": {
            "callOrder": 0,
            "stageNumber": 0,
            "http": {
              "url": "https://mycompany.palantirfoundry.com/multipass/api/search/v2/search",
              "httpContentType": "application/json",
              "httpMethod": "POST",
              "httpParams": "{\"attributeFilters\": {}, \"query\": \"\", \"pageSize\": 1000000, \"pageStart\": 0, \"principalTypes\": [\"GROUP\"]}",
              "httpHeaders": {
                "Content-Type": "application/json",
                "Authorization": "${access_token}"
              }
            },
            "listField": "values",
            "keyField": "entitlementID",
            "colsToPropsMap": {
              "entitlementID": "id~#~char",
              "entitlement_value": "id~#~char",
              "customproperty1": "name~#~char"
            }
          }
        }
      }
    }
  },
  "acctEntParams": {
    "connection": "acctAuth",
    "entTypes": {
      "Roles": {
        "call": {
          "call1": {
            "callOrder": 0,
            "stageNumber": 0,
            "processingType": "httpAcctToEnt",
            "http": {
              "url": "https://mycompany.palantirfoundry.com/multipass/api/groups/memberships/immediate",
              "httpContentType": "application/json",
              "httpMethod": "PUT",
              "httpParams": "{\"principalIds\": [${id}]}",
              "httpHeaders": {
                "Content-Type": "application/json",
                "Authorization": "${access_token}"
              }
            },
            "listField": "",
            "entIdPath": "groupsByPrincipalId",
            "entKeyField": "entitlementID",
            "acctKeyField": "accountID"
          }
        }
      }
    }
  }
}

 

 

 

ConnectionJSON:

 

{
  "authentications": {
    "acctAuth": {
      "authType": "oauth2",
      "authError": [
        ""
      ],
      "url": "https://mydomain.palantirfoundry.com/multipass/api/oauth2/token",
      "httpMethod": "POST",
      "httpContentType": "application/x-www-form-urlencoded",
      "errorPath": "error",
      "maxRefreshTryCount": 5,
      "tokenResponsePath": "access_token",
      "tokenType": "Bearer",
      "authHeaderName": "Authorization",
      "accessToken": "xxx",
      "httpParams": {
        "grant_type": "client_credentials",
        "client_secret": "REDACTED",
        "client_id": "REDACTED"
      },
      "retryFailureStatusCode": [
        401,
        400
      ]
    }
  }
}

 

 

 

Error logs attached to post.

 

 

In the error logs I see there is also a "pullObjectsByRest - responseStatusCode ::200" but is that for the connectionJSON? It is getting 200 and storing the access token?

3 REPLIES 3

Saathvik
All-Star
All-Star

@IAM : Try below JSON if it still didn't work can you pls share the postman screenshot for authentication call

{
    "authentications": {
        "acctAuth": {
            "authType": "oauth2",
            "url": "https://mydomain.palantirfoundry.com/multipass/api/oauth2/token",
            "httpMethod": "POST",
            "httpParams": {
                "grant_type": "client_credentials",
                "client_secret": "REDACTED",
                "client_id": "REDACTED"
            },
            "httpHeaders": {
                "contentType": "application/x-www-form-urlencoded",
                "Accept": "application/x-www-form-urlencoded"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "errorPath": "error",
            "authError": [
                ""
            ],
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "access_token",
            "tokenType": "Bearer",
            "authHeaderName": "Authorization",
            "accessToken": "Bearer xxx",
            "retryFailureStatusCode": [
                401,
                400
            ]
        }
    }
}

Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

IAM
Regular Contributor
Regular Contributor

 

curl --location 'https://mydomain.palantirfoundry.com/multipass/api/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=REDACTED' \
--data-urlencode 'client_secret=REDACTED'

 

AZ_0-1701453638491.png

AZ_1-1701453659950.png

Body:

AZ_2-1701454503779.png

 

 

 

@IAM: Can you try below JSON

{
    "authentications": {
        "acctAuth": {
            "authType": "oauth2",
            "url": "https://mydomain.palantirfoundry.com/multipass/api/oauth2/token",
            "httpMethod": "POST",
            "httpParams": {
                "grant_type": "client_credentials",
                "client_secret": "REDACTED",
                "client_id": "REDACTED"
            },
            "httpHeaders": {
                "contentType": "application/x-www-form-urlencoded"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "errorPath": "error",
            "authError": [
                ""
            ],
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "access_token",
            "tokenType": "bearer",
            "authHeaderName": "Authorization",
            "accessToken": "xxx",
            "retryFailureStatusCode": [
                401,
                400
            ]
        }
    }
}

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.