# Retrieve Custom authentication token from response header

**URL:** <https://developer.sailpoint.com/discuss/t/retrieve-custom-authentication-token-from-response-header/28440>\
**Category:** SHF Discussion and Questions\
**Tags:** apis, identity-security-cloud\
**Created:** [February 1, 2024, 2:14pm UTC](https://developer.sailpoint.com/discuss/t/retrieve-custom-authentication-token-from-response-header/28440 "2024-02-01T14:14:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nadim](https://avatars.discourse-cdn.com/v4/letter/n/9dc877/32.png) [@Nadim](https://developer.sailpoint.com/discuss/u/Nadim)\
**Post date:** [February 1, 2024, 2:14pm UTC](https://developer.sailpoint.com/discuss/t/retrieve-custom-authentication-token-from-response-header/28440/1 "2024-02-01T14:14:14Z")

</div>

Hello,

I am configuring a web service connector for an application, there is a specific endpoint to authenticate therefore I have configured the custom authentication in my connection settings and I created the custom authentication operation.

The issue I have is that the token returned is stored in the response header not the body. Is there a way to retrieve this token from the header?

I tried to do the following configuration in my custom authentication response information and use the variable for response headers but it doesn’t seem to work  
 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/f/fb44eafba3f62cf9f96f98031fb707ecbb6b3de7.png)

Has anyone done similar configuration? and if yes can you please tell me what did you to solve this?

Best regards

---

<div class="post-metadata">

**Author:** ![Nadim](https://avatars.discourse-cdn.com/v4/letter/n/9dc877/32.png) [@Nadim](https://developer.sailpoint.com/discuss/u/Nadim)\
**Post date:** [February 2, 2024, 3:57pm UTC](https://developer.sailpoint.com/discuss/t/retrieve-custom-authentication-token-from-response-header/28440/2 "2024-02-02T15:57:10Z")

</div>

I was able to solve the issue with an after operation rule

---

<div class="post-metadata">

**Author:** ![uday\_kilambi](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/uday_kilambi/32/31482_2.png) [@uday\_kilambi](https://developer.sailpoint.com/discuss/u/uday_kilambi)\
**Post date:** [February 2, 2024, 4:03pm UTC](https://developer.sailpoint.com/discuss/t/retrieve-custom-authentication-token-from-response-header/28440/3 "2024-02-02T16:03:09Z")

</div>

You can use restClient.getReponseHeaders() to retrieve the information of headers in after operation rule.

---

<div class="post-metadata">

**Author:** ![Nadim](https://avatars.discourse-cdn.com/v4/letter/n/9dc877/32.png) [@Nadim](https://developer.sailpoint.com/discuss/u/Nadim)\
**Post date:** [February 2, 2024, 4:21pm UTC](https://developer.sailpoint.com/discuss/t/retrieve-custom-authentication-token-from-response-header/28440/4 "2024-02-02T16:21:12Z")

</div>

Hello Uday, thank you for your answer. This is exactly what I did.

---

<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:** [April 2, 2024, 4:21pm UTC](https://developer.sailpoint.com/discuss/t/retrieve-custom-authentication-token-from-response-header/28440/5 "2024-04-02T16:21:58Z")

</div>

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