cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
timalex
Helper I
Helper I

My API Token disappears

I'm building a flow that needs to obtain a login token from our Barracuda WAF via API which I do via POST.

 

This works fine and the Token is received in tact. 

 

timalex_0-1622492374677.png

 

I then parse the JSON to make it usable for any next steps. 

 

Still fine. 

 

When i try to use the value of the token that's been parsed it's coming back as null and for the LIFE of me i can't figure out why. 

 

timalex_1-1622492546896.png

See it's there ^^^

 

timalex_2-1622492671572.png

This is how I'm attempting to use that value ^^^

 

timalex_3-1622492749174.png

 

And "poof" it's now gone.

 

What the fudge y'all?

 

I've tried initializing it as a variable and setting it that way, and same result, it's null and gone. 

 

Please tell me someone knows what I'm missing or doing wrong. 

 

Thanks in advance

 

 

7 REPLIES 7
PrasadAthalye
Community Champion
Community Champion

Can you try 2 things to troubleshoot?

 

  • Add Compose and map it to JSON Token property and see if it shows .
  • Copy token from your logs and Hardcode in HTTP call and see if it works?

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
rrovira
Microsoft
Microsoft

Hello, @timalex!

 

That's very strange, I'll be investigating to see if I find something! In the meantime, could you please try initializing a variable and then checking with a conditional to see if it equals "null"? 

 

Anything I find, I'll post it here right away! 

Cheers

Thanks for the suggestion PrasadAthalye,

 

So I have added a Compose action and mapped it to the JSON Token Property like so:

timalex_0-1622560215250.png

 

And then I try and pass that to the HTTP GET like so:

timalex_1-1622560286821.png

 

And when I run it, it is now just blank and not even null any longer:

timalex_2-1622560343631.png

I can't use the hard code option because each time i generate the token it changes. 

 

I appreciate all of the suggestions, thank you!

 

 

Thank you rrovira,

  So i've initialized and set the variable as below:

 

timalex_0-1622562057057.png

 

I didn't use a conditional, because i can see it's still "null" in the test logs as below:

 

timalex_1-1622562193638.png

 

Thanks again for responding, i appreciate it. There has to be a solution i just can't 'see' it yet 🙂

 

 

Can you upload JSON Parse Output?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

That's the entirety of the JSON Parse Output. 

 

timalex_0-1622568483575.png

 

 

{
    "body": {
        "token""eyJldCI6IjE2MjI1NjkzNTMiLCJwdjas72384kf9284kfo882kWU4YjBmM2Y4ODFiM2U2\nNWUyZThmIiwidXNlciI6InRzdGV2ZW5zX2FkbWluIn0=\n"
    }
}

I also added a condition to check to see if the token value was indeed null and on it's first test run it returned 'true'

 

timalex_1-1622568867817.png

 

 

timalex_0-1622568843732.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,751)