# Reuse Authentication service token for REST connector

**URL:** <https://forums.pega.com/t/reuse-authentication-service-token-for-rest-connector/1762>\
**Category:** General\
**Tags:** 8-3-5, security, data-integration, case-management\
**Created:** [September 29, 2021, 9:58am UTC](https://forums.pega.com/t/reuse-authentication-service-token-for-rest-connector/1762 "2021-09-29T09:58:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JOHAN.GRALL](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@JOHAN.GRALL](https://forums.pega.com/u/JOHAN.GRALL)\
**Post date:** [September 29, 2021, 9:58am UTC](https://forums.pega.com/t/reuse-authentication-service-token-for-rest-connector/1762/1 "2021-09-29T09:58:01Z")

</div>

Hi,

I have a requirement to reuse token from SSO connection (with OpenID authentication service) and I want to reuse this token for REST connector.

 ![Token usage.jpg](https://pega1.discourse-cdn.com/pega/original/2X/6/64fbde43adf5086b4d52a22fd7e4bfdf420d2171.jpeg)

But it seems impossible with Pega OOTB behavior (we use Pega 8.3.5).  
Do you know if it’s possible ?

Current implementation:

- When user connect to Pega platform with SSO, an OpenID authentication service is used… So a token is available in table **pr\_data\_token** with grant type “Authorization code” and a specific scope
- When user use connector REST, we use authentication profile with “authorization code” and same scope that used in authentication service.  
But Pega doesn’t use automatically token available in table pr\_data\_token; so we should use gadget **pxInformationMashup** to retrieve a fresh token (but in this case, there is a popup to ask credential to this user).

Even if we will be able to reuse token generated when user connect, I didn’t find a solution to refresh this token.

Do you have already implement this type of requirement on other project ?

Thanks in advance for your feedback.

---

<div class="post-metadata">

**Author:** ![Nirmalya.SenSharma](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@Nirmalya.SenSharma](https://forums.pega.com/u/Nirmalya.SenSharma)\
**Post date:** [September 29, 2021, 5:24pm UTC](https://forums.pega.com/t/reuse-authentication-service-token-for-rest-connector/1762/2 "2021-09-29T17:24:54Z")

</div>

@JOHAN.GRALL

See if this article helps: [Pegasystems Documentation](https://community.pega.com/knowledgebase/articles/whats-new-pega-platform/configure-authentication-profile-json-web-token-bearer-grant-type-84)

Apparently, you can reuse the JWT token from your active SSO session, which I believe is your case.

Also, I believe you need to enable ‘Use refresh token if available’ option on the auth profile of your connector rule.

Thanks

---

<div class="post-metadata">

**Author:** ![JOHAN.GRALL](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@JOHAN.GRALL](https://forums.pega.com/u/JOHAN.GRALL)\
**Post date:** [October 6, 2021, 10:01am UTC](https://forums.pega.com/t/reuse-authentication-service-token-for-rest-connector/1762/3 "2021-10-06T10:01:30Z")

</div>

@Nirmalya.SenSharma Thanks for your response.  
Currently, we use Pega version 8.3.5 and not Pega 8.4.

I will test it when migrate on Pega new version.

Currently, we will continue to use custom system to get new token when necessary (wit pxInformationMashup gadget)
