Extract bearer token from a string ADF and APIs

  • Hi all

    I just wondered if there was a way to extract only the bearer token of the below string into a variable.

    I have a variable @activity('GetToken').output.accessToken

    When I run the task I get the following value into my variable.

    {

    "name": "token",

    "value": "eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI0MDAiLCJpYXQiOjE2Mjc1NTM1MTcsImlzcyI6ImF"

    }

    What I want to do now though is to have only the long string. Is there a way of only getting the long string from this variable?

    Or... is there an easier way of getting a bearer token in ADF from an API GET

    Many thanks for any help

    • This topic was modified 1 month, 2 weeks ago by  Steve Jones - SSC Editor. Reason: shorten token value for formatting and security
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply