# Web Services SaaS Connector – Custom Authentication with JSON Body Fails (Bearer Token)

**URL:** <https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612>\
**Category:** SHF Discussion and Questions\
**Tags:** webservice-connector, sailpoint-identity-security, apis\
**Created:** [March 16, 2026, 5:21pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612 "2026-03-16T17:21:55Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blazelip](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/blazelip/32/17177_2.png) [@Blazelip](https://developer.sailpoint.com/discuss/u/Blazelip)\
**Post date:** [March 16, 2026, 5:21pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/1 "2026-03-16T17:21:55Z")

</div>

Hi Team,

I’m configuring a **Web Services SaaS Connector** to integrate with MobileExpense (MXP). The target application uses a custom token endpoint that accepts a JSON body and returns a Bearer token. I’ve configured Custom Authentication but both Test Connection and Account Aggregation fail with a generic error.

## Target Application Auth Endpoint

- **URL:** `POST https://auth.mobilexpense.com/Authentication/GetJsonToken`
- **Content-Type:** `application/json`
- **Request Body:**

```json
{
  "uniqueId": "Base64EncodedString==",
  "key": "secret_key_value",
  "authorizeSameIpOnly": false
}

```

- **Response (200 OK):**

```json
{
  "access_token": "eyJhbGciOiJodHRwOi8vd3d3Lnczb...",
  "token_type": "Bearer",
  "expires_in": 86399
}

```

**This works perfectly in Postman** — I get a valid token and can use it to call all MXP API endpoints successfully.

## My Configuration

### Connection Settings

- **Authentication Type:** Custom Authentication
- **Base URL:** `https://api-mxp.mobilexpense.com`
- All other fields (Username, Password, API Token, etc.) left blank

### Custom Authentication HTTP Operation

**General Information:**

- Operation Name: `Custom Authentication`
- Operation Type: `Custom Authentication`
- CustomAuthenticationURL: `https://auth.mobilexpense.com/Authentication/GetJsonToken`
- HTTP Method: `POST`

**Header:**

| Key | Value |
| --- | --- |
| Content-Type | application/json |

**Body (Raw):**

```json
{
  "uniqueId": "MjEtMTUxNC0yRk...MTUxNA==",
  "key": "my_secret_key",
  "authorizeSameIpOnly": false
}

```

**Response Mapping:**

| Schema Attribute | Attribute Path |
| --- | --- |
| accesstoken | access\_token |

**Note:** After saving the configuration, I can see the token value automatically populated in the Attribute Path field of the Response Mapping, which suggests the Custom Authentication call itself is succeeding and the token is being retrieved.

### Test Connection Operation

**General Information:**

- Operation Name: `Test Connection`
- Operation Type: `Test Connection`
- Context URL: `/Synchro/User/Entity/1514/noe.sandbox.ECFILDMI` (confirmed working in Postman)
- HTTP Method: `GET`

**Header:**

| Key | Value |
| --- | --- |
| Authorization | Bearer $application.accesstoken$ |

## Error

Both Test Connection and Account Aggregation fail with the same generic error:

```auto
[ConnectorError] Error (requestId: b58739e951a04d169c386685d1f02ca8)

```

No HTTP status code, no detailed message — just `[ConnectorError] Error`.

## What I’ve Already Tried

1. **Verified credentials work in Postman** — auth endpoint returns 200 with valid token, and all MXP API endpoints work with that token.
2. **Tried different Response Attribute names** — both `access_token` (with underscore) and `accesstoken` (without underscore) as the Schema Attribute in the Custom Auth response mapping.
3. **Removed quotes from Authorization header value** — ensured it’s `Bearer $application.accesstoken$` without surrounding quotes.
4. **Tried with API Token auth type previously** — worked fine with a hardcoded token, confirming the MXP API endpoints and response mappings are correct.

## Questions

1. Has anyone successfully used **Custom Authentication with a JSON body** on the **Web Services SaaS** connector (not the VA-based one)?
2. Is there a known limitation with Custom Authentication on WSC SaaS that would cause this behavior? I found [this community post](https://developer.sailpoint.com/discuss/t/help-needed-web-saas-connector-custom-authentication-bearer-token-issue/144677) that guided me in the configuration, but it didn’t work out

Any guidance would be greatly appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![Carlatto](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/carlatto/32/4764_2.png) [@Carlatto](https://developer.sailpoint.com/discuss/u/Carlatto)\
**Post date:** [March 16, 2026, 6:49pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/2 "2026-03-16T18:49:34Z")

</div>

On your custom authentication endpoint, how is Response Information setup?

---

<div class="post-metadata">

**Author:** ![HussainshaSyed001](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/hussainshasyed001/32/28234_2.png) [@HussainshaSyed001](https://developer.sailpoint.com/discuss/u/HussainshaSyed001)\
**Post date:** [March 16, 2026, 8:29pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/3 "2026-03-16T20:29:47Z")

</div>

have you tried this ?[Custom Authentication](https://documentation.sailpoint.com/connectors/saas/web_services/help/saas_connectivity/web_services/custom_authentication.html)

---

<div class="post-metadata">

**Author:** ![David\_Norris](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@David\_Norris](https://developer.sailpoint.com/discuss/u/David_Norris)\
**Post date:** [March 16, 2026, 8:44pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/4 "2026-03-16T20:44:23Z")

</div>

> [@HussainshaSyed001](#):
>
> have you tried this ?[Custom Authentication](https://documentation.sailpoint.com/connectors/saas/web_services/help/saas_connectivity/web_services/custom_authentication.html)

Literally in the OP’s title and stated in his “Custom Authentication HTTP Operation” section.

---

<div class="post-metadata">

**Author:** ![j\_place](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/j_place/32/19181_2.png) [@j\_place](https://developer.sailpoint.com/discuss/u/j_place)\
**Post date:** [March 17, 2026, 8:40am UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/5 "2026-03-17T08:40:38Z")

</div>

Hi @Blazelip Do you know whether the connector is actually resolving the $application.accesstoken$ variable? I ask coz I’ve got an outstanding issue where these type of variables are not getting resolved on the SaaS Web Services Connector. As a test, maybe add it to the actual context URL and see in the logs whether it is getting resolved?

---

<div class="post-metadata">

**Author:** ![Blazelip](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/blazelip/32/17177_2.png) [@Blazelip](https://developer.sailpoint.com/discuss/u/Blazelip)\
**Post date:** [March 17, 2026, 9:26am UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/6 "2026-03-17T09:26:10Z")

</div>

Here how it looks like

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/e/9/e93d2d093bc9e2f382d0bb3d929268c7c910aa66.png)

---

<div class="post-metadata">

**Author:** ![Blazelip](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/blazelip/32/17177_2.png) [@Blazelip](https://developer.sailpoint.com/discuss/u/Blazelip)\
**Post date:** [March 17, 2026, 12:32pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/7 "2026-03-17T12:32:40Z")

</div>

Hello Jeremy,  
Actually I’m not aware of this, I need to check this hypothesis

---

<div class="post-metadata">

**Author:** ![Carlatto](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/carlatto/32/4764_2.png) [@Carlatto](https://developer.sailpoint.com/discuss/u/Carlatto)\
**Post date:** [March 17, 2026, 2:57pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/8 "2026-03-17T14:57:19Z")

</div>

From the documentation:

Be sure to use a custom name for the **Response Attribute Key** other than the default name. For example, instead of using `accesstoken` you can define it as `customaccesstoken`.

- The `accesstoken` entry can’t be used in response mapping for custom authentication. You must use a different, unique entry to save the response.

So change your Response Mapping, have the Schema Attribute be something else. Ex. custom\_accesstoken

Then use $application.custom\_accesstoken$ in your other endpoints.

---

<div class="post-metadata">

**Author:** ![Blazelip](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/blazelip/32/17177_2.png) [@Blazelip](https://developer.sailpoint.com/discuss/u/Blazelip)\
**Post date:** [March 17, 2026, 3:13pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/11 "2026-03-17T15:13:49Z")

</div>

@Carlatto  
This hint would be valid for the non SaaS connector  
It’s mentioned in its [documentation](https://documentation.sailpoint.com/connectors/webservices/help/integrating_webservices/idn_config_for_custom_authentication.html)

Since I’m configuring SaaS connector and its [documentation](https://documentation.sailpoint.com/connectors/saas/web_services/help/saas_connectivity/web_services/custom_authentication.html) there is no such message about having the `custom_accesstoken`.

But still I was too desperate yesterday, that’s why I’ve tried out this trick already, didn’t workout.

---

<div class="post-metadata">

**Author:** ![Carlatto](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/carlatto/32/4764_2.png) [@Carlatto](https://developer.sailpoint.com/discuss/u/Carlatto)\
**Post date:** [March 17, 2026, 3:21pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/12 "2026-03-17T15:21:06Z")

</div>

I would try out Jeremy’s recommendation. If it isn’t showing in the logs, then I would recommend opening a support ticket.

---

<div class="post-metadata">

**Author:** ![Blazelip](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/blazelip/32/17177_2.png) [@Blazelip](https://developer.sailpoint.com/discuss/u/Blazelip)\
**Post date:** [March 18, 2026, 2:06pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/13 "2026-03-18T14:06:10Z")

</div>

> [@Blazelip](#):
>
> ```auto
> {
> "uniqueId": "MjEtMTUxNC0yRk...MTUxNA==",
> "key": "my_secret_key",
> "authorizeSameIpOnly": false
> }
> 
> ```

Just in case if someone reads this thread and has the same issue.  
I figured this out, 2 important points:

- `customaccesstoken` demand as well necessary as in the non SaaS connector.
- The formatted JSON Request Payload you see above occurred my error.  
After I’ve trimmed it, it worked out.

So the payload should look like this  
`{"uniqueId": "MjEtMTUxNC0yRk...MTUxNA==","key": "my_secret_key","authorizeSameIpOnly": false}`

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [May 17, 2026, 2:07pm UTC](https://developer.sailpoint.com/discuss/t/web-services-saas-connector-custom-authentication-with-json-body-fails-bearer-token/199612/14 "2026-05-17T14:07:04Z")

</div>

Closed on May 17, 2026, 2:07pm UTC

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