Click HERE to see how Saviynt Intelligence is transforming the industry. |
12/01/2023 09:44 AM - edited 12/01/2023 09:45 AM
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?
12/01/2023 09:56 AM
@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
]
}
}
}
12/01/2023 10:01 AM - edited 12/01/2023 10:15 AM
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'
Body:
12/01/2023 03:04 PM
@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
]
}
}
}