# SCIM PATCH/DELETE fails on SAML enterprise connections — non-URL-safe id in CREATE response

**URL:** <https://community.auth0.com/t/scim-patch-delete-fails-on-saml-enterprise-connections-non-url-safe-id-in-create-response/197855>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [March 4, 2026, 8:40pm UTC](https://community.auth0.com/t/scim-patch-delete-fails-on-saml-enterprise-connections-non-url-safe-id-in-create-response/197855 "2026-03-04T20:40:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben30](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ben30/32/73295_2.png) [@ben30](https://community.auth0.com/u/ben30)\
**Post date:** [March 4, 2026, 8:40pm UTC](https://community.auth0.com/t/scim-patch-delete-fails-on-saml-enterprise-connections-non-url-safe-id-in-create-response/197855/1 "2026-03-04T20:40:28Z")

</div>

## Issue

We have SCIM provisioning enabled on a SAML enterprise connection. SCIM CREATE operations succeed, but all subsequent PATCH and DELETE operations fail because Auth0’s SCIM endpoint returns a non-URL-safe `id` in the CREATE response.

## What’s happening

When a user is created via SCIM, Auth0 returns the internal composite `user_id` as the SCIM `id`:

```json
"id": "samlp|my-saml-connection|username"

```

This `id` contains pipe characters (`|`) which are illegal in URI paths per RFC 3986. When the upstream SCIM client (Okta, using Apache-HttpClient) stores this `id` and attempts PATCH or DELETE, it tries to construct a URL like:

```auto
PATCH https://<tenant>.us.auth0.com/scim/v2/connections/<connection_id>/Users/samlp|my-saml-connection|username

```

This fails with:

```auto
java.lang.IllegalArgumentException: Illegal character in path at index 94

```

The error occurs on the **client side** before the request is even sent. As a result:

- PATCH and DELETE requests never reach Auth0
- No error logs appear on the Auth0 tenant
- User lifecycle management (updates, deprovisioning) via SCIM is completely broken

## Expected behavior

Per RFC 7643 Section 3.1, the SCIM `id` field must be usable in URL paths since it’s used to construct resource endpoints. Auth0 should either:

1. URL-encode the `id` value (e.g., `samlp%7Cmy-saml-connection%7Cusername`)
2. Use the internal UUID instead of the composite `user_id`

## Steps to reproduce

1. Create a SAML enterprise connection with SCIM provisioning enabled
2. Have the upstream IdP (e.g., Okta) create a user via SCIM POST
3. Observe that Auth0 returns a pipe-delimited `id` in the response
4. Attempt a SCIM PATCH or DELETE on that user — fails with illegal character error

## Environment

- Auth0 tenant: Development
- Connection type: SAML (Enterprise)
- SCIM client: Okta (Apache-HttpClient 4.5.10)
- Auth0 tenant log event type for successful create: `sscim`

## Impact

This blocks all SCIM user provisioning beyond initial creation for SAML enterprise connections. We cannot update or deprovision users via SCIM, which is a critical gap for enterprise customer onboarding.

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [March 6, 2026, 5:06pm UTC](https://community.auth0.com/t/scim-patch-delete-fails-on-saml-enterprise-connections-non-url-safe-id-in-create-response/197855/3 "2026-03-06T17:06:14Z")

</div>

Hi @ben30,

Welcome to the Auth0 Community!

You have identified correctly that the error `java.lang.IllegalArgumentException: Illegal character in path` is occurring because the SCIM client (Okta) is attempting to use the Auth0 `user_id` as the unique resource identifier in the URL path.

That is why mapping the id is not the solution for SCIM Inbounding. It is noted in our [Configure Inbound SCIM - Attribute mapping](https://auth0.com/docs/authenticate/protocols/scim/configure-inbound-scim#attribute-mapping) that:

> The SCIM id and meta attributes cannot be mapped… The id value in SCIM responses is always set to the Auth0 user\_id.

Because this field is immutable and hardcoded to the pipe-delimited `user_id`, the id itself can not be configured as the user’s identifier in this cases.

To bypass this, you must configure Okta to use the `userName` (which is URL-safe) as the resource identifier instead of the system `id`.

You can follow the instructions found in our [Inbound SCIM for Okta Workforce SAML Connections](https://auth0.com/docs/authenticate/protocols/scim/inbound-scim-for-okta-workforce-saml-connections) documentation:

First, ensure that the `userName` attribute is mapped to a URL-safe field, such as `email`.

1. In the Auth0 Dashboard, go to Settings \> Mapping for your SCIM connection.
2. Update the mapping to ensure `userName` uses the `email`:

```auto
{
  "scim": "userName",
  "auth0": "email"
}

```

In the Okta Provisioning settings for the Auth0 app:

1. Locate the **Unique identifier field for users**.
2. Change this setting from `id` to **`userName`**.

Okta will now construct the URL as `.../Users/user@example.com` instead of using the pipe-delimited ID. Since the email address is URL-safe, the `IllegalArgumentException` will be resolved.

We recognize that the use of non-URL-safe characters in the primary SCIM ID can create friction, but this is currently by design. If you would like so, you can create a [Product feedback](https://community.auth0.com/c/feedback/95) since this might be considered for a future change and our product team tracks these requests closely.

I hope this helps and if you have further questions please let me know!  
Best regards,  
Remus

---

<div class="post-metadata">

**Author:** ![ben30](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ben30/32/73295_2.png) [@ben30](https://community.auth0.com/u/ben30)\
**Post date:** [March 18, 2026, 2:52pm UTC](https://community.auth0.com/t/scim-patch-delete-fails-on-saml-enterprise-connections-non-url-safe-id-in-create-response/197855/4 "2026-03-18T14:52:18Z")

</div>

Hello,

If I do this I get this error -

 ![image](https://global.discourse-cdn.com/auth0/original/3X/b/f/bf8313c1400dab2d6e2b5bc87ee2390ec211cd1e.png)

---

<div class="post-metadata">

**Author:** ![ben30](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ben30/32/73295_2.png) [@ben30](https://community.auth0.com/u/ben30)\
**Post date:** [March 18, 2026, 2:55pm UTC](https://community.auth0.com/t/scim-patch-delete-fails-on-saml-enterprise-connections-non-url-safe-id-in-create-response/197855/5 "2026-03-18T14:55:19Z")

</div>

I removed the 2nd mapping for email, is that correct? do I need to change the “SCIM attribute containing user id”?

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [March 19, 2026, 5:47pm UTC](https://community.auth0.com/t/scim-patch-delete-fails-on-saml-enterprise-connections-non-url-safe-id-in-create-response/197855/6 "2026-03-19T17:47:18Z")

</div>

Hi @ben30,

> [@ben30](#):
>
> removed the 2nd mapping for email, is that correct? do I need to change the “SCIM attribute containing user id”?

The change is correct, as mentioned in the documentation as well.

No, the “SCIM attribute containing user id” is correctly set to `userName`. This tells Auth0: “When a user logs in via SAML, look at the attribute which is designated as `userName` to identify them.” Since the `userName` is mapped to `email`, this ensures consistency.

Kind regards,  
Remus

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 2, 2026, 5:47pm UTC](https://community.auth0.com/t/scim-patch-delete-fails-on-saml-enterprise-connections-non-url-safe-id-in-create-response/197855/7 "2026-04-02T17:47:28Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
