Use this guide to resolve errors from the Perk SCIM API. When you provision users, you might hit an error if your account isn't set up correctly or the request isn't formatted correctly.
The table below lists common errors and how to fix them.
| Error code | Details | Action |
|---|---|---|
| 403 | SCIM integration not set up. Go to the Perk app and enable it in Settings > Integrations, User provisioning | To use the SCIM API, turn it on for your Perk account at app.perk.com/company/integrations/scim. |
| 400 | Unknown PATCH operation | The SCIM operation in the request isn't valid. See Update a user to build a valid PATCH request. |
| 400 | Value for [attribute] is not valid: Enter a valid [attribute] | The attribute value isn't correct. Check the User schema and Enterprise user schema for valid values. |
| 400 | SCIM attribute [path] not found in schema | The path in the PATCH request doesn't follow the schema. See Update a user to build a valid PATCH request. |
| 400 | SCIM attribute to update not found. Paths: [paths] | The path in the PATCH request doesn't follow the schema. See Update a user to build a valid PATCH request. |
| 400 | Missing or not well formatted mandatory attribute [attribute] | To create a user, define all required attributes. Check the User schema and Enterprise user schema. |
| 400 | SCIM attribute [attribute] cannot be updated | This attribute can't be updated. Check the attribute's mutability in the User schema and Enterprise user schema. |
| 400 | [attribute] should be type [type], but got type [type] | The attribute value is the wrong type. Check the attribute's type in the User schema and Enterprise user schema. |
| 400 | Value [value] for [attribute] is not valid | The attribute value is invalid. This usually happens with string fields that need extra validation, such as an email address or a phone number. |
| 400 | Attribute [attribute] is mandatory, cannot be None | A required attribute can't be set to null. Check the attribute's requirements in the User schema and Enterprise user schema. |
| 400 | Attribute [attribute] is mandatory, cannot be removed | A required attribute can't be removed. Check the attribute's requirements in the User schema and Enterprise user schema. |
| 400 | Path attribute is mandatory for 'remove' operations | A remove operation needs an attribute path. Add the path to the operation. |
| 400 | value attribute is mandatory for replace and add operation. [operation] | A replace or add operation needs a value. See Update a user to build a valid PATCH request. |
| 400 | The match path [filters] is not well formatted or not supported | The filter in the PATCH operation path isn't formatted correctly, or Perk doesn't support it. |
| 400 | The filter [filters] is not well formatted | The list filter isn't formatted correctly, or Perk doesn't support it. See List all users for supported filters. |
| 400 | The filter operation [operator] is not supported | The list filter isn't formatted correctly, or Perk doesn't support it. See List all users for supported filters. |
| 400 | Value [value] not valid for attribute [attribute] | The value for the attribute is either not formatted correctly or doesn't refer to a valid entity in your Perk account. |
| 400 | Unable to manage automated approval processes for user with externalId='[scim_external_id]'. Reason: Please review your Perk SCIM integration settings as it's not set up to use the SCIM approvers field. | The request includes the approvers field, but the SCIM integration is set up through an identity provider. Go to app.perk.com/company/integrations/scim and set the integration to use Perk's API. |
| 404 | Resource [user id] not found | The user in the request wasn't found. Make sure the ID matches a valid user in your Perk account. |
| 409 | A user with userName [userName] already exists. The userName must be unique | A user with this userName already exists. The userName must be unique in Perk. |
| 429 | Rate limits reached | Wait before sending the next request, then add an exponential back-off to spread out retries. See an exponential back-off example. For the limits, see rate limits. |

