# Custom Authentication issue with WebService Connector

**URL:** <https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313>\
**Category:** SHF Discussion and Questions\
**Tags:** webservice-connector, identity-security-cloud, aggregation\
**Created:** [October 19, 2022, 10:26am UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313 "2022-10-19T10:26:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![yunus\_merck](https://avatars.discourse-cdn.com/v4/letter/y/22d042/32.png) [@yunus\_merck](https://developer.sailpoint.com/discuss/u/yunus_merck)\
**Post date:** [October 19, 2022, 10:26am UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/1 "2022-10-19T10:26:35Z")

</div>

Hi,

We are integrating webservice connector in IDN. The webservice application follows below authentication process-  
1- Provide the username and password and hit the url which will return the SessionId in response  
2- Use this sessionId to invoke other operations.

Below is the config we have done in Identity Now-  
1- Authentication type- No/CustomAuthentication  
2- Custom Authentication Operation has below config-

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/5/53cc3d886798909b018d41c272e52075d145cc42.png)  
 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/0/0c008077602334e1aa81f3f48e3065d1003a7cca.png)  
 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/b/bd4494c8fc7e46fef0a54f7f848d157ab3fc8a89.png)  
 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/0/03683bb546fec9a9ac65e62f0168f8b7ae8884f0.png)

3- For other operation, like Test Connection or Account Aggregation we have configured the headers as-

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

Every time we try to run the aggregation it failed with the error-  
 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/e/ec2ddcc922211ef2e4f9d50b9ca3389eb0b4183a.png)

However if we do TestConnection first and then Run Aggregation it works fine. So it seems the sessionId is not getting populated for Aggregation when run without doing TestConnection. We verified this by putting logs too.  
We also tried to add the error codes as we read on compass about it, but this also didnot resolve the issue.

Kindly let us know if anyone faced the same issue or has any insights.

Thanks  
Yunus

---

<div class="post-metadata">

**Author:** ![Manju22](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Manju22](https://developer.sailpoint.com/discuss/u/Manju22)\
**Post date:** [January 12, 2023, 11:46am UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/3 "2023-01-12T11:46:02Z")

</div>

Hi Yunus, Are you able to fix this issue?

---

<div class="post-metadata">

**Author:** ![yunus\_merck](https://avatars.discourse-cdn.com/v4/letter/y/22d042/32.png) [@yunus\_merck](https://developer.sailpoint.com/discuss/u/yunus_merck)\
**Post date:** [January 12, 2023, 12:07pm UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/4 "2023-01-12T12:07:22Z")

</div>

Hi,

Yes, we were able to resolve the issue by adding the possible Http error codes.  
Just check what error message your api throws like INVALID\_SESSION ID and error codes like 402,403 etc. Just add them from the UI and hopefully it will resolve for you.

---

<div class="post-metadata">

**Author:** ![cpatel](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@cpatel](https://developer.sailpoint.com/discuss/u/cpatel)\
**Post date:** [January 12, 2023, 12:16pm UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/5 "2023-01-12T12:16:36Z")

</div>

custom authentication by default regenerates token only on 401 error code so if your end system is sending another error code it would not retry token generation OOTB.

---

<div class="post-metadata">

**Author:** ![Manju22](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Manju22](https://developer.sailpoint.com/discuss/u/Manju22)\
**Post date:** [January 12, 2023, 12:35pm UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/6 "2023-01-12T12:35:24Z")

</div>

Test connection works fine. But in account aggregation, its not taking the sessionId from custom authentication. From the logs, I could see its not executing the CustomAuthentication operation before account aggregation.sequenceNumberForEndpoint is also in correct order.

---

<div class="post-metadata">

**Author:** ![franciscojoserodrig1](https://avatars.discourse-cdn.com/v4/letter/f/f1d935/32.png) [@franciscojoserodrig1](https://developer.sailpoint.com/discuss/u/franciscojoserodrig1)\
**Post date:** [January 20, 2023, 2:31pm UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/7 "2023-01-20T14:31:09Z")

</div>

Hi @Manju22,

Were you able to fix this somehow?, thanks.

---

<div class="post-metadata">

**Author:** ![Manju22](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Manju22](https://developer.sailpoint.com/discuss/u/Manju22)\
**Post date:** [January 26, 2023, 9:26am UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/8 "2023-01-26T09:26:17Z")

</div>

Yes, our source supported Basic Authorization `Authorization` {`sessionId`} and Bearer Token Authorization `Authorization` Bearer {`sessionId`}

Adding Authorization as  
Bearer $application.accesstoken$

Also added HTTP Errors

errorMessages

Invalid or expired session ID., INVALID\_SESSION\_ID

errorCodes

---

<div class="post-metadata">

**Author:** ![Divya\_K](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@Divya\_K](https://developer.sailpoint.com/discuss/u/Divya_K)\
**Post date:** [March 14, 2023, 2:30pm UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/9 "2023-03-14T14:30:19Z")

</div>

@Manju22

We are also having the same issue  
Test connection works fine but while aggregating it shows 403 error

Where we need to add http error error messages?

---

<div class="post-metadata">

**Author:** ![Manju22](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Manju22](https://developer.sailpoint.com/discuss/u/Manju22)\
**Post date:** [March 14, 2023, 2:56pm UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/10 "2023-03-14T14:56:31Z")

</div>

Source - Edit configuration - additional settings

[https://documentation.sailpoint.com/connectors/webservices/help/integrating\_webservices/additional\_settings.html](https://documentation.sailpoint.com/connectors/webservices/help/integrating_webservices/additional_settings.html)

---

<div class="post-metadata">

**Author:** ![Jhayes90](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@Jhayes90](https://developer.sailpoint.com/discuss/u/Jhayes90)\
**Post date:** [June 12, 2023, 2:41pm UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/11 "2023-06-12T14:41:39Z")

</div>

Im running into similar issue. Ive added the http error code and message to the config and its still throwing the same error and not attempting to retry/or regenerate token.

---

<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:** [August 11, 2023, 2:41pm UTC](https://developer.sailpoint.com/discuss/t/custom-authentication-issue-with-webservice-connector/6313/12 "2023-08-11T14:41:50Z")

</div>

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