cancel
Showing results for 
Search instead for 
Did you mean: 

Bearer Token Credential

FredericTaes
Level 3
Dear @Blueprism Support,

We're trying to use the bearer token Credential type. We are trying to fill the Credential with the value of a token we retrieve programmatically.

However, the Credential VBO does not support any interaction with a Credential that doesn't contain username/password.
Does this mean Blue Prism does not support the interaction with other types of Credentials​ ? A.k.a. a bearer token Credentials can only be hardcoded and read, not written to ?

Kind regards,


------------------------------
Frederic Taes
------------------------------
4 REPLIES 4

david.flores
Staff
Staff

Hello Frederic,

Please review our documentation on Bearer tokens found on page 18 of the linked document from on our BP Portal:

https://portal.blueprism.com/system/files/documents/v6.4%20User%20Guide%20-%20Web%20APIs_2.pdf

Essentially, the Bearer Token Credential type: "Caters for situations where the token has already been obtained and needs to be sent in the authorization header."

However, I believe what will help your situation is our Custom Credentials, which allow bespoke authentication methods to be used in Blue Prism. More details on this Custom method can be found on page 22 of the same document mentioned above.

Let me know if this helps with your situation?



------------------------------
Regards,

David Flores
Sr. Product Consultant
blue prism
------------------------------
Regards, [FirstName] [LastName] [JobTitle] [CompanyName]

Hi David,

Thanks for the document. We already checked this out. Unfortunately, this doesn't cover our needs, as we are trying to retrieve a token via a custom authentication method, and subsequently write it to a Blue Prism Credential. As we don't seem to find any method of doing so, we're stuck. Hence my above question: tokens/credentials can only be read, and not written to ?

Kind regards,

Frederic

------------------------------
Frederic Taes
------------------------------

Hello Frederic, 

Try using the "Set" Action of the "Credentials"  Business Object. Within the input parameters of this action set the "Password" value with your derived "Token" value.

I was recently told that the password input is also mapped to the Token when bearer token credential type is used. I test this and it appears to work for me. Also please be sure to consider the Preconditions:

-A credentials key must be defined within this Blue Prism environment
-Credentials with the specified name must exist
-The credentials must be accessible to the running user, process and resource

Let me know if this works for you.

------------------------------
Regards,

David Flores
Sr. Product Consultant
blue prism
------------------------------
Regards, [FirstName] [LastName] [JobTitle] [CompanyName]

Hi David,

that may possibly be a solution. I'll have to try it out !

Unfortunately another issue has arisen: the retrieval of the token (from MS Dynamics) seems to be impossible with BP. The local system setup uses the OAuth 2.0 principle, but only with grant type "authorization code" (without the client secret). When analysed in Chrome, calling the authentication URL results in multiple redirects (code 302) to perform the authorization code generation, which is then used to authenticate. However, Blueprism's HTTP VBO doesn't seem to support the 302 redirections, currently ending our attempt to generate the token programmatically ...

Thanks for the help though !

Kind regards,

------------------------------
Frederic Taes
------------------------------