Skip to main content

 

 

Coupa Success Portal

1.7 Remove a Role from a User

Using API

  1. Remove the (Buyer) role from a User in the HR system.

  2. The ERP Connector platform should trigger an API call to Coupa using GET API to query the User’s <id> that you need to update (based on “login”, for example, but any queryable field/tag can be used depending on business scenario).

  3. The ERP Connector platform should trigger a Coupa PUT API to update the status for the User in Coupa using the User's <id>.

  4. Ensure that you get a 200 API response and it is logged in your ERP Connector platform logging engine. If you get a different API response (for example, 400) error, the API error (returned on API response <errors><error> tag(s)) must be logged in the ERP Connector platform logging engine and a notification must be sent to the relevant person to investigate.

  5. Validate that the User in Coupa has the (Buyer) role removed.

Sample API 

In this example, a User is queried based on the User's “login” name (USER_TEST); then the API response Coupa user <id> is used to update the Coupa User's status to have the (Buyer) role removed.

GET

https://<instance_url>/api/users?login=USER_TEST

The return payload has the Coupa user <id> (277) and all the roles the User already has.

PUT

https://<instance_url>/api/users/277

Payload

<?xml version="1.0" encoding="UTF-8"?>
<user>
  <roles />
</user>

Add roles as in Add a Role to a User. You may add multiple roles in one API PUT call.

Using CSV

See Add a Role to a User, but in the CSV file, list the role(s) that the User should have.

Remove all roles from a User by adding --NULL-- to the User Role Names field.

The CSV flat file upload is monitored in Coupa at https://<instance>/data_sources. Coupa sends a notification to Coupa Admin on an upload failure, and Coupa Admin needs to investigate further.

  • Was this article helpful?