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

Coupa import doesn't work

Iabdelmoneim
New Contributor
New Contributor
We are trying to establish connection between Saviynt and Coupa system and till now we cannot import users.
And now sometimes we get 400 and 401 Error and sometimes even such error is not showing but we are sure that token is working, since all works well on Postman.
 
we are using the following importjson
{
"accountParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url": "https://domain/api/users",
"httpContentType":"application/json",
"httpMethod":"GET",
"httpHeaders":{
"Bearer": "${access_token}",
 "Accept": "application/json"
}
},
"listField":"",
"keyField":"accountID",
"colsToPropsMap":{
"accountID": "id~#~char",
"customproperty1": "email~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "fullname~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty6": "company~#~char",
"customproperty7": "cost-center~#~char",
"customproperty8": "purchasing-user~#~char",
"customproperty9": "expense-user~#~char",
"customproperty10": "sourcing-user~#~char",
"customproperty11": "inventory-user~#~char",
"customproperty12": "contracts-user~#~char",
"customproperty13": "analytics-user~#~char",
"customproperty14": "created-by.id~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings":{
"Roles":{
"importAsEntitlement":true,
"listPath":"roles",
"idPath":"id",
"keyField":"entitlementID",
"colsToPropsMap":{
"entitlementID":"id~#~char",
"entitlement_value":"name~#~char",
"customproperty1":"description~#~char"
}
}
}
},
"entitlementParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"entTypes":{
"Roles":{

}
}
},
"acctEntParams":{
"processingType":"acctToEntMapping"
}
}
 
40 REPLIES 40

Raghu
All-Star
All-Star

@Iabdelmoneim  can give below and chekc it

Raghu_0-1715866736492.png

 

"httpHeaders":{
"Authorization": "${access_token}",
"Accept": "application/json"
}


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

rushikeshvartak
All-Star
All-Star

use below updated json

 

 

we are using the following importjson
{
"accountParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url": "https://domain/api/users",
"httpContentType":"application/json",
"httpMethod":"GET",
"httpHeaders":{
"Authorization": "${access_token}",
 "Accept": "application/json"
}
},
"listField":"",
"keyField":"accountID",
"colsToPropsMap":{
"accountID": "id~#~char",
"customproperty1": "email~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "fullname~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty6": "company~#~char",
"customproperty7": "cost-center~#~char",
"customproperty8": "purchasing-user~#~char",
"customproperty9": "expense-user~#~char",
"customproperty10": "sourcing-user~#~char",
"customproperty11": "inventory-user~#~char",
"customproperty12": "contracts-user~#~char",
"customproperty13": "analytics-user~#~char",
"customproperty14": "created-by.id~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings":{
"Roles":{
"importAsEntitlement":true,
"listPath":"roles",
"idPath":"id",
"keyField":"entitlementID",
"colsToPropsMap":{
"entitlementID":"id~#~char",
"entitlement_value":"name~#~char",
"customproperty1":"description~#~char"
}
}
}
},
"entitlementParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"entTypes":{
"Roles":{

}
}
},
"acctEntParams":{
"processingType":"acctToEntMapping"
}
}

 

 


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

Iabdelmoneim
New Contributor
New Contributor

JOB ATTRIBUTE NAME JOB ATTRIBUTE VALUE

Job NameApplication Data Import (Multi Threaded)
Job Typefull
Import Typeaccounts
Existing Roles0

I see that we are still not able to complete the import after following the solution you provided

Does it works from postman if yes please share screenshot masking sensitive information 


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

Iabdelmoneim
New Contributor
New Contributor

Dear,

for the following call https://domain/api/users?offset=0&limit=50  

Screenshot 2024-05-21 at 08.56.37.png

 

Screenshot 2024-05-20 at 09.11.21.png

[This message has been edited by moderator to mask url] 

Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]


⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️


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

Iabdelmoneim
New Contributor
New Contributor

Hi Vartak,

 

Please find below.

this from output curl.

curl

\
--header 'ACCEPT: application/json' \
--header 'Authorization: Bearer ' \
--header 'Cookie: _mkra_ctxt=--200'

this from output JSON

[
{
"id":,
"created-at": "",
"updated-at": "",
"login": "",
"email": "",
"purchasing-user": true,
"expense-user": false,
"sourcing-user": false,
"inventory-user": false,
"contracts-user": false,
"analytics-user": false,
"aic-user": false,
"spend-guard-user": false,
"ccw-user": false,
"clm-advanced-user": false,
"supply-chain-user": false,
"risk-assess-user": false,
"travel-user": false,
"treasury-user": false,
"employee-number": null,
"firstname": "",
"middlename": null,
"lastname": "",
"fullname": "",
"api-user": true,
"active": true,
"salesforce-id": null,
"account-security-type": null,
"authentication-method": "",
"sso-identifier": null,
"default-locale": null,
"business-group-security-type": 0,
"avatar-thumb-url": null,
"mention-name": "",
"seniority-level": null,
"business-function": null,
"employee-payment-channel": "",
"allow-employee-payment-account-creation": false,
"category-planner-user": false,
"roles": [
{
]
 
Thank you!
Ibrahim

Hi @Iabdelmoneim 

Please use the below connection JSON. Update the host, url and url in testconnectionparams. Use the actual access token at the place of <Token> after Bearer. Perform save and test connection and share the logs and status of save and test.

{
    "authentications": {
        "acctAuth": {
            "authType": "oauth2",
            "httpHeaders": {
                "Host": "ecco-test.coupahost.com",
                "contentType": "application/json"
            },
            "authError": [
                "InvalidAuthenticationToken",
                "AuthenticationFailed"
            ],
            "url": "https://ecco-test.coupahost.com/oauth2/token",
            "httpMethod": "POST",
            "httpContentType": "application/x-www-form-urlencoded",
            "errorPath": "error.code",
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "access_token",
            "tokenType": "Bearer",
            "authHeaderName": "X-COUPA-API-KEY",
            "accessToken": "Bearer <TOKEN>",
            "retryFailureStatusCode": [
                401
            ],
            "testConnectionParams": {
                "http": {
                    "url": "https://domain/api/users",
                    "httpHeaders": {
                        "Authorization": "${access_token}"
                    },
                    "httpContentType": "application/json",
                    "httpMethod": "GET"
                }
            }
        }
    }
}

Use the below ImportJSON , update the values and run the import. Share the logs and status of import.

{
"accountParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url": "https://domain/api/users",
"httpContentType":"application/json",
"httpMethod":"GET",
"httpHeaders":{
"Authorization": "${access_token}",
 "Accept": "application/json"
}
},
"listField":"",
"keyField":"accountID",
"colsToPropsMap":{
"accountID": "id~#~char",
"customproperty1": "email~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "fullname~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty6": "company~#~char",
"customproperty7": "cost-center~#~char",
"customproperty8": "purchasing-user~#~char",
"customproperty9": "expense-user~#~char",
"customproperty10": "sourcing-user~#~char",
"customproperty11": "inventory-user~#~char",
"customproperty12": "contracts-user~#~char",
"customproperty13": "analytics-user~#~char",
"customproperty14": "created-by.id~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings":{
"Roles":{
"importAsEntitlement":true,
"listPath":"roles",
"idPath":"id",
"keyField":"entitlementID",
"colsToPropsMap":{
"entitlementID":"id~#~char",
"entitlement_value":"name~#~char",
"customproperty1":"description~#~char"
}
}
}
},
"entitlementParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"entTypes":{
"Roles":{

}
}
},
"acctEntParams":{
"processingType":"acctToEntMapping"
}
}

Regards,

Dhruv Sharma

Hi Dhruv,

I have tried but I am getting the following 

 

  • Null response from the Target. Target Error Message: [responseText:null, statusCode:null

Thanks,

Ibrahim

Hi @Iabdelmoneim 

could you please share the logs for below and also confirm if save and test connection is working.

1. save and test connection 

2. Import job

Iabdelmoneim
New Contributor
New Contributor

Dear,

Import failed and we get the following in the logs.

 

2024-05-21T15:28:50+02:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-7-z9dpp-DEBUG-Got showLogs = true
 
2024-05-21T15:28:50+02:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-z9dpp-DEBUG-Calling Webservice Url - https://domain/api/users with httpParams - null
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-calling executeRequestWithTimeoutConfig for api...
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-calling api...
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-before calling executeRequestWithHeaders for api...
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-isFipsEnabled = false
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-getHttpClient - proxyParams : null
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-getHttpClient - sslSocketFactory : null
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-setting connection timeout to 10 seconds and request timeout to 60 seconds
 
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-getHttpClient - HttpClientBuilder.create().build() called.
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-called executeGetRequestWithHeaders for api...
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-after calling executeRequestWithHeaders for api...
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-called api...
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-timeout validated for api...
 
2024-05-21T15:28:50+02:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-7-z9dpp-DEBUG-got response for api...
 
2024-05-21T15:28:50+02:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-7-z9dpp-DEBUG-Got showLogs = true
 
2024-05-21T15:28:50+02:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-z9dpp-DEBUG-Got Webservice API Response: [headers:[Date: Tue, 21 May 2024 13:28:50 GMT, Content-Type: application/json, Content-Length: 134, Connection: keep-alive, status: 401 Unauthorized, cache-control: no-cache, x-robots-tag: none, www-authenticate: Bearer realm="OpenID Connect", error="invalid_token", error_description="The access token provided is expired, revoked, malformed or invalid for other reasons.", x-request-id:  x-runtime: 0.005940, server: envoy, strict-transport-security: max-age=31536000; includeSubDomains;], responseText:{"error":"invalid_token","error_description":"The access token provided is expired, revoked, malformed or invalid for other reasons."}, cookies:[], statusCode:401]
 
2024-05-21T15:28:50+02:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-7-z9dpp-DEBUG-pullObjectsByRest - responseStatusCode ::401
 
2024-05-21T15:28:50+02:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-z9dpp-ERROR-Exception in pullObjectsByRest :401
 
2024-05-21T15:28:50+02:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-7-z9dpp-ERROR-Inside token Expiry Exception block. connectionParamMap.refreshTryCount : 1
 

1. save and test connection 

Connection works and tested successfully

2. Import job

failed with the above error and in the UI

Error WebService call failed After retrying 5 times with responseStatusCode nullFailed url-https://domain/api/users with Error Message-null
Error while getting Account Import Response WebService call failed with responseStatusCode nullFailed url-https://domain/api/users with Error Message-null
 

From the error, it looks that you have provided either incorrect/expired token first time or it is not able to get the new token from the API. Could you please retry with fresh token.

"invalid_token","error_description":"The access token provided is expired, revoked, malformed or invalid for other reasons."}, cookies:[], statusCode:401]

Dhruv_S
Saviynt Employee
Saviynt Employee

Please use below in connection JSON and keep same importJSON as earlier and confirm if it works. Exclude Bearer keyword both in tokentype and accessToken value.

 

{
    "authentications": {
        "acctAuth": {
            "authType": "oauth2",
            "httpHeaders": {
                "Host": "ecco-test.coupahost.com",
                "contentType": "application/json"
            },
            "authError": [
                "InvalidAuthenticationToken",
                "AuthenticationFailed"
            ],
            "url": "https://ecco-test.coupahost.com/oauth2/token",
            "httpMethod": "POST",
            "httpContentType": "application/x-www-form-urlencoded",
            "errorPath": "error.code",
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "access_token",
            "tokenType": "",
            "authHeaderName": "X-COUPA-API-KEY",
            "accessToken": "<TOKEN>",
            "retryFailureStatusCode": [
                401
            ],
            "testConnectionParams": {
                "http": {
                    "url": "https://domain/api/users",
                    "httpHeaders": {
                        "Authorization": "${access_token}"
                    },
                    "httpContentType": "application/json",
                    "httpMethod": "GET"
                }
            }
        }
    }
}

 

Regards,

Dhruv

Iabdelmoneim
New Contributor
New Contributor

Hi Dhruv,

We are still getting the same.

 

Thanks!

{
  "authentications": {
    "acctAuth": {
      "authType": "oauth2",
      "httpHeaders": {
        "contentType": "application/x-www-form-urlencoded"
      },
      "httpParams": {
        "grant_type": "client_credentials",
        "client_secret": "CLIENT_SECRET_VALUE",
        "client_id": "CLIENT_ID_VALUE",
        "scope": "CLIENT_ID_VALUE"
      },
      "httpContentType": "application/x-www-form-urlencoded",
      "authError": [
        "InvalidAuthenticationToken",
        "AuthenticationFailed"
      ],
      "url": "https://xxxxxxxxxx.coupahost.com/oauth2/token",
      "httpMethod": "POST",
      "errorPath": "error.code",
      "maxRefreshTryCount": 5,
      "tokenResponsePath": "access_token",
      "tokenType": "Bearer",
      "accessToken": "Bearer abc",
      "retryFailureStatusCode": [
        401
      ],
      "testConnectionParams": {
        "http": {
          "url": "https://domain/api/users",
          "httpHeaders": {
            "Authorization": "${access_token}"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        }
      }
    }
  }
}

 

Document have old version JSON

Update client id / secret/ scope


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

Hi @Iabdelmoneim could you please check and confirm if it is working with the above JSON  mentioned by @rushikeshvartak 

Regards,

Dhruv Sharma

Iabdelmoneim
New Contributor
New Contributor

Dear,

Thank you for your support, now import is working but there is no entitlement being imported. 

here is ImportAccountEntJSON so please if you can advise, i have done a bit modifications but still no ent to import.

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

 

Thank you!

Hi @Iabdelmoneim 

Please refer to the working JSON at the end of the below post and let us know if it helps. 

Solved: Import Coupa Roles/Entitlements - Saviynt Forums - 70113

Regards,

Dhruv Sharma

 

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxx.coupahost.com/api/users?fields=%5B%22id%22%2C%22email%22%2C%22login%22%2C%22active%22%2...",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}


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

Iabdelmoneim
New Contributor
New Contributor

Dear Dhruv,

I have tried the solution but I see no entitlements were imported.

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

Please advise.

Thank you!

 

Hi @Iabdelmoneim 

Could you please share the logs and the working postman screenshot. Please share on ticket if there is a ticket open and share the ticket number.

Regards,

Dhruv Sharma

Iabdelmoneim
New Contributor
New Contributor

Hi,

Attached all to the following ticket #INC-2026274

 

Thank you!

 

Hi @Iabdelmoneim 

The JSON above doesn't have URL for entitlement/roles. Kindly refer below sample and modify your JSON accordingly. Please note the highlighted lines in the below JSON and add the URL for the entitlementtype (roles/Usergroup etc) which you want to import your JSON. 

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountsNotInImportAction": "Suspend",
"accountThresholdValue": 1000
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://wawa.coupahost.com/api/users",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"customproperty1": "email~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "fullname~#~char",
"customproperty5": "mention-name~#~char",
"customproperty6": "api-user~#~char",
"customproperty14": "created-by.id~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty32": "requisition-approval-limit.name~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 1000,
"totalCountPath": 100
}
}
}
},
"acctEntMappings": {
"Role": {
"importAsEntitlement": false,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID"
},
"User Group": {
"importAsEntitlement": false,
"listPath": "user-groups",
"idPath": "id",
"keyField": "entitlementID"
},
"Business Group": {
"importAsEntitlement": false,
"listPath": "content-groups",
"idPath": "id",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Role": {
"entTypeOrder": 0,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 1,
"http": {
"url": "https://XYZ.coupahost.com/api/roles",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}
},
"User Group": {
"entTypeOrder": 1,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 2,
"http": {
"url": "https://XYZ.coupahost.com/api/user_groups",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}
},
"Business Group": {
"entTypeOrder": 2,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 3,
"http": {
"url": "https://XYZ.coupahost.com/api/business_groups",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

Regards,

Dhruv Sharma

Iabdelmoneim
New Contributor
New Contributor

This Json got a lot of accounts to be suspended. attached logs to the ticket 

Hi @Iabdelmoneim 

I have just shared the above JSON as a sample. Please use the JSON which you were using already and only add the URLs for roles api only just like the above JSON. Without API URL mentioned in the JSON, it won't import entitlements.

Regards,

Dhruv Sharma

Iabdelmoneim
New Contributor
New Contributor

Dear Dhruv,

I would appreciate if you can give me the final version of JSON that I should use since it is still not working. And it worth to mention what I am trying to do is not only importing entitlements but also assign it to the accounts or correlate it.

Thank you!

Used attached working json


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

Iabdelmoneim
New Contributor
New Contributor

Hi Rushikesh,

Import is working but still accounts missing entitlements.

So please if you can advise?

Thank you!

Ibrahim

@Iabdelmoneim 

Please use below JSON and update the url for users and roles. Please confirm if it works. 

 

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Role": {
"importAsEntitlement": false,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Role": {
  "entTypeOrder": 0,
  "entTypeLabels": {
    "customproperty1": "Meta Created"
  },
  "call": {
    "call1": {
      "connection": "acctAuth",
      "callOrder": 0,
      "stageNumber": 1,
      "http": {
        "url": "https://XYZ.coupahost.com/api/roles",
        "httpMethod": "GET",
        "httpHeaders": {
          "Authorization": "${access_token}",
          "Accept": "application/json",
          "Content-Type": "application/json"
        }
      },
      "listField": "",
      "keyField": "entitlementID",
      "colsToPropsMap": {
        "entitlementID": "id~#~char",
        "entitlement_value": "name~#~char",
        "description": "description~#~char"
      },
      "pagination": {
        "offset": {
          "offsetParam": "offset",
          "batchParam": "limit",
          "batchSize": 50,
          "totalCountPath": 10000
        }
      }
    }
  }
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

 

Regards,

Dhruv Sharma

  • Does account have Entitlements
  • Please share current JSON
  • postman API Response for 1 of the account.
  • Also share account CP31 screenshot from saviynt

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

Iabdelmoneim
New Contributor
New Contributor

Hi Dhruv,

Sorry but still accounts are being imported and no entitlements are associated or roles.

 

Thank you!

Ibrahim

Iabdelmoneim
New Contributor
New Contributor
  • Does account have Entitlements

Yes

  • Please share current JSON

shared in the ticket 

  1. #INC-2026274
  • postman API Response for 1 of the account
  1. #INC-2026274
  • Also share account CP31 screenshot from saviynt

Screenshot 2024-05-29 at 08.53.56.png

Hi @Iabdelmoneim 

Please use the below JSON and share the results. Share the logs on ticket.

Please note that this is only for the entitlement type roles. For other entitlement types, you need to modify the same.

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxx.coupahost.com/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {"entTypeOrder": 0,
        "entTypeLabels": {
          "customproperty1": "Meta Created"
        },
        "call": {
          "call1": {
            "connection": "acctAuth",
            "callOrder": 0,
            "stageNumber": 1,
            "http": {
              "httpHeaders": {
                "Authorization": "${access_token}",
                "Accept": "application/json"
              },
              "url": "https://<BASE_URL>/api/roles",
              "httpContentType": "application/json",
              "httpMethod": "GET"
            },
            "listField": "",
            "keyField": "entitlementID",
            "colsToPropsMap": {
              "entitlementID": "id~#~char",
              "entitlement_value": "name~#~char",
              "description": "description~#~char"
            },
            "pagination": {
              "offset": {
                "offsetParam": "offset",
                "batchParam": "limit",
                "batchSize": 50,
                "totalCountPath": 10000
              }
            }
          }
        }}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

Regards,

Dhruv Sharma

Iabdelmoneim
New Contributor
New Contributor

Hi Dhruv,

still Entitlements aren't being associated with the accounts, logs shared. in the ticket and account example.

 

Thank you!

Ibrahim

Iabdelmoneim
New Contributor
New Contributor

Hi,

Now we have the following.

- When we create account in Saviynt isn't reflected in Coupa

- When we add new role to the account in Saviynt isn't reflected in Coupa

IMport JSON:

{

"accountParams": {

"connection": "acctAuth",

"processingType": "SequentialAndIterative",

"call": {

"call1": {

"callOrder": 0,

"stageNumber": 0,

"http": {

"url": "https://domain/api/users",

"httpContentType": "application/json",

"httpMethod": "GET",

"httpHeaders": {

"Authorization": "${access_token}",

"Accept": "application/json"

}

},

"listField": "",

"keyField": "accountID",

"colsToPropsMap": {

"accountID": "id~#~char",

"name": "login~#~char",

"status": "active~#~char",

"customproperty5": "active~#~char",

"customproperty1": "email~#~char",

"customproperty2": "firstname~#~char",

"customproperty3": "lastname~#~char",

"customproperty4": "mention-name~#~char",

"customproperty7": "active~#~char",

"customproperty14": "created-at~#~char",

"customproperty15": "sso-identifier~#~char",

"customproperty16": "employee-number~#~char",

"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"

},

"pagination": {

"offset": {

"offsetParam": "offset",

"batchParam": "limit",

"batchSize": 50,

"totalCountPath": 85000

}

}

}

},

"acctEntMappings": {

"Roles": {

"importAsEntitlement": true,

"listPath": "roles",

"idPath": "id",

"keyField": "entitlementID",

"colsToPropsMap": {

"entitlementID": "id~#~char",

"entitlement_value": "name~#~char",

"customproperty1": "description~#~char"

}

}

}

},

"entitlementParams": {

"connection": "acctAuth",

"processingType": "SequentialAndIterative",

"entTypes": {

"Roles": {"entTypeOrder": 0,

        "entTypeLabels": {

          "customproperty1": "Meta Created"

        },

        "call": {

          "call1": {

            "connection": "acctAuth",

            "callOrder": 0,

            "stageNumber": 1,

            "http": {

              "httpHeaders": {

                "Authorization": "${access_token}",

                "Accept": "application/json"

              },

              "url": "https://domin/api/roles",

              "httpContentType": "application/json",

              "httpMethod": "GET"

            },

            "listField": "",

            "keyField": "entitlementID",

            "colsToPropsMap": {

              "entitlementID": "id~#~char",

              "entitlement_value": "name~#~char",

              "description": "description~#~char"

            },

            "pagination": {

              "offset": {

                "offsetParam": "offset",

                "batchParam": "limit",

                "batchSize": 50,

                "totalCountPath": 10000

              }

            }

          }

        }}

}

},

"acctEntParams": {

"processingType": "acctToEntMapping"

}

}

 

CREATE Account:

{

"accountIdPath": "call1.message.id",

"responseColsToPropsMap": {

"displayname": "call1.message.fullname~#~char",

"customproperty1": "call1.message.email~#~char",

"customproperty2": "call1.message.firstname~#~char",

"customproperty3": "call1.message.lastName~#~char",

"name": "call1.message.login~#~char",

"customproperty5": "call1.message.mention-name~#~char",

"customproperty16": "call1.message.sso-identifier~#~char"

},

"call": [{

"name": "call1",

"connection": "acctAuth",

"url": "https://domain/api/users/${account.accountID}",

"httpMethod": "PUT",

"httpParams": "{\"login\":\"${user.locationdesc}\",\"sso-identifier\":\"${user.locationdesc}\",\"email\":\"${user.email}\",\"firstname\":\"${user.firstname}\",\"lastname\":\"${user.lastname}\",\"fullname\":\"${user.displayname}\",\"band\":\"${user.employeeclass}\",\"sharp-user-id\":\"${user.username}\",\"phone-work\":\"${user.phonenumber}\",\"default-address\":{\"country\":{\"code\":\"${user.country}\"},\"city\":\"${user.city}\",\"street1\":\"${user.street}\",\"postal-code\":\"${user.customproperty31}\"},\"state\":\"${user.customproperty58}\"}},\"requisition-approval-limit\":{\"name\":\"${user.country}+'-'+${user.employeeclass}\"}, \"invoice-approval-limit\":{\"name\":\"${user.country}+'-'+${user.employeeclass}\"}}",

"httpHeaders": {

"accessToken": "${access_token}",

"Accept": "application/json"

},

"httpContentType": "application/json",

"successResponses": {

"statusCode": [200, 201]

}

}]

}

 

Adding Access:

{
"call": [
{
"name": "Roles",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"roles\":{\"roles\":{\"name\":\"${entitlementValue.entitlement_value}\"}}}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
},
{
"name": "User Group",
"connection": "acctAuth",
"url": "https://domain/api/user_group_memberships",
"httpMethod": "POST",
"httpParams": "{\"user-group-id\": ${entitlementValue.entitlementID},\"user-id\": ${account.accountID}}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
},
{
"name": "Business Group",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"content-groups\":[{\"id\": ${entitlementValue.entitlementID}}]}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
}
}
]
}

Update Account:

{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"displayName": "call1.message.fullname~#~char",
"name": "call1.message.login~#~char",
"customproperty1": "call1.message.email~#~char",
"customproperty2": "call1.message.firstname~#~char",
"customproperty3": "call1.message.lastName~#~char",
"customproperty4": "call1.message.fullname~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty6": "call1.message.company~#~char",
"customproperty7": "call1.message.cost-center~#~char",
"customproperty8": "call1.message.purchasing-user~#~char",
"customproperty9": "call1.message.expense-user~#~char",
"customproperty10": "call1.message.sourcing-user~#~char",
"customproperty11": "call1.message.inventory-user~#~char",
"customproperty12": "call1.message.contracts-user~#~char",
"customproperty13": "call1.message.analytics-user~#~char",
"customproperty14": "call1.message.created-by.id~#~char" },
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"login\":\"${user.username}\",\"email\":\"${user.customproperty1}\",\"firstname\":\"${account.customproperty2}\",\"lastname\":\"${account.customproperty3}\",\"fullname\":\"${account.customproperty4}\",\"mention-name\":\"${account.customproperty5}\",\"company\":\"IN10\",\"cost-center\":\"IN1019624\",\"purchasing-user\":\"${requestAccessAttributes.customproperty8}\",\"expense-user\":\"${requestAccessAttributes.customproperty9}\",\"sourcing-user\":\"${requestAccessAttributes.customproperty10}\",\"inventory-user\":\"${requestAccessAttributes.customproperty11}\",\"contracts-user\":\"${requestAccessAttributes.customproperty12}\",\"analytics-user\":\"${requestAccessAttributes.customproperty13}\"}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}

Please advise,

Thank you

 

Send authorization in httpHeader

 

"Authorization": "${access_token}",


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

Iabdelmoneim
New Contributor
New Contributor

Hi,

I have added and still the same and now we get 

 

2024-06-21T11:00:02+02:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-10-xqjqw-DEBUG-Got null response statusCode with erroMsg - [error:Error Illegal character in path at index 43: https://domain/api/users/${account.name}] 

and

 

{"call1":{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}}

Logs attached in the following ticket

Please advise urgently thanks a lot,

Ibra

[This message has been edited by moderator to disable url hyperlink]

Share current JSON


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

Iabdelmoneim
New Contributor
New Contributor

Import account 

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {"entTypeOrder": 0,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 1,
"http": {
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"url": "https://domain/api/roles",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

 

 

--------

 

CREATE ACCOUNT

{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"displayName": "call1.message.fullname~#~char",
"customproperty1": "call1.message.email~#~char",
"customproperty2": "call1.message.firstname~#~char",
"customproperty3": "call1.message.lastName~#~char",
"name": "call1.message.login~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty16": "call1.message.sso-identifier~#~char"
},
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://domain/api/users/",
"httpMethod": "POST",
"httpParams": "{\"login\":\"${user.locationdesc}\",\"sso-identifier\":\"${user.locationdesc}\",\"active\":false,\"email\":\"${user.email}\",\"firstname\":\"${user.firstname}\",\"lastname\":\"${user.lastname}\",\"fullname\":\"${user.displayname}\",\"band\":\"${user.employeeclass}\",\"sharp-user-id\":\"${user.username}\",\"phone-work\":\"${user.phonenumber}\",\"roles\":{\"role\":{\"name\":\"ABI Read Only\"}},\"default-address\":{\"country\":{\"code\":\"${user.country}\"},\"city\":\"\",\"street1\":\"${user.street}\",\"postal-code\":\"${user.customproperty31}\",\"state\":\"${user.customproperty58}\"},\"default-currency\":{\"code\":\"USD\"},\"requisition-approval-limit\":{\"name\":\"${user.country}-${user.employeeclass}\"},\"invoice-approval-limit\":{\"name\":\"${user.country}-${user.employeeclass}\"},\"authentication-method\":\"saml\"}",
"httpHeaders": {
"accessToken": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}

 

-----

 

UPDATE ACCOUNT

 

{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.name}",
"httpMethod": "PUT",
"httpParams": "{\"login\":\"${user.username}\",\"email\":\"${user.customproperty1}\",\"firstname\":\"${account.customproperty2}\",\"lastname\":\"${account.customproperty3}\",\"fullname\":\"${account.customproperty4}\",\"mention-name\":\"${account.customproperty5}\",\"company\":\"IN10\",\"cost-center\":\"IN1019624\",\"purchasing-user\":\"${requestAccessAttributes.customproperty8}\",\"expense-user\":\"${requestAccessAttributes.customproperty9}\",\"sourcing-user\":\"${requestAccessAttributes.customproperty10}\",\"inventory-user\":\"${requestAccessAttributes.customproperty11}\",\"contracts-user\":\"${requestAccessAttributes.customproperty12}\",\"analytics-user\":\"${requestAccessAttributes.customproperty13}\"}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json",
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}

 

---

ENABLE

 

{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"active\":true}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"Authorization": "${access_token}",
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}

 

---

ADD ACCESS

 

{
"call": [
{
"name": "Roles",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.name}",
"httpMethod": "PUT",
"httpParams": "{\"roles\":{\"role\":{\"name\":\"${entitlementValue.entitlement_value}\"}}}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"Authorization": "${access_token}",
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
},
{
"name": "User Group",
"connection": "acctAuth",
"url": "https://domain/api/user_group_memberships",
"httpMethod": "POST",
"httpParams": "{\"user-group-id\": ${entitlementValue.entitlementID},\"user-id\": ${account.accountID}}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"Authorization": "${access_token}",
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
},
{
"name": "Business Group",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.name}",
"httpMethod": "PUT",
"httpParams": "{\"content-groups\":[{\"id\": ${entitlementValue.entitlementID}}]}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Authorization": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
}
}
]
}

 

---

 

PLEASE FIND ABOVE JSONS

In create account JSON change 

"accessToken": "${access_token}", to 

"Authorization": "${access_token}",


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