Skip to main content
Question

how to fill bearer token in multitennant situation when token is stored in SQL table

  • November 26, 2025
  • 3 replies
  • 16 views

Forum|alt.badge.img+1

we have a web connection where we (temporarily) receive the bearer tokens via another way (yes i know, not ideal, hence temporary) and store them in a table.

 

i have modelled the web connection with authentication type: bearer token and the bearer token as {token}.

my question is: how do i fill this with the value in the table for every tennant?

3 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi Mike,

To use the {token}, you will need a Web connection parameter to map the parameter onto a process variable. Then in the Web connection process action, map the process variable that holds the tenant specific bearer token onto the token input parameter.

Prior to this Web connection process action, you most like have a Decision process action in which the Bearer must be obtained from the database for a specific tenant (based on some conditions) and be placed in the process variable.

More info on it here: Web connections | Thinkwise Documentation

Hope this helps!

Edit; for the time being if you really have to store the credentials in a table, you could opt to use Encrypt and Decrypt. This way, the bearer token can be initially stored encrypted in the database and only Indicium can decrypt it. In your process flow, that calls the web connection, the Decrypt process action ccan decrypt the bearer token.


Forum|alt.badge.img+1
  • Author
  • Apprentice
  • November 26, 2025

Hi Mark,

 

thanks!

 

had a look at the documentation also prior to asking. the how to was just not clear for me.

I tried it via a task, but that didn't work, since the task put it in the body, not the header.

should I run the task and the decision in a particular order?

 

and thanks also for the encryption tip!


Mark Jongeling
Administrator
Forum|alt.badge.img+23

Without knowing the complete process, I'm guessing here.

You most likely have a task that initiates the process flow. I assume this is a Table task and inherits the tenant_id from the selected record.

The Process flow, most likely, should be like this:

Start → Start table task* → Web connection → something else / Stop

Or Start → Start table task* → Decrypt → Web connection → something else / Stop

* (Process procedure), but you could opt to add a decision instead as next process action.

In the Process procedure, whether it is on the Start table task or a separate decision, it should take care of obtaining the Bearer token, by selecting it from the table based on the tenant_id and presumably customer_id. 

If you do opt to apply encryption, the Decrypt process action is necessary to decrypt the obtained token. When obtaining the token, it first need to be placed in an varbinary(max) process variable as the encrypted value is varbinary. Then be given to the Decrypt action as Input. The Output value should be mapped on the next process variable...

The (decrypted) token should then be placed in a process variable, let's say token.

Then in the Web connection process action input parameters, bind parameter token with variable token.

Now, your {token} will be replaced at runtime with the value of the process variable token.

Does this help enough to build it successfully?