Conversation

Corporaci?n Credomatic SA
CR
Last activity: 24 Sep 2025 1:24 EDT
How to dynamically modify the "scope" of an Authentication Profile for a REST connector?
Hello Community,
I am currently researching how to make a REST service connector (JSON) use a single, centralized Authentication Profile (OAuth 2.0, "Client Credentials" grant type) for multiple connectors.
My goal is to be able to dynamically modify the "scope" parameter of the Authentication Profile, using the specific scope sent in each connector's request. The main idea is to avoid creating a separate Authentication Profile for each connector when the only difference between them is the scope.
What I have tried:
I attempted to define a variable (e.g., dynamic_scope
) in the "Request" tab of the Authentication Profile, hoping to assign a value to it from my connector (for instance, through a Data Page or a Pre-Data Transform). However, when I run the connector, the "scope" value in the Authentication Profile is not updated with the value I am sending.
My specific question is:
Is there a standard or recommended way in Pega for an Authentication Profile to retrieve the "scope" value from the connector's execution context? In other words, I need a way to "inject" or modify the "scope" value that will be used for that specific transaction right before the Authentication Profile requests the token.
Thank you in advance for any guidance or examples you can share.
thank you!