web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Parse XML with xpath r...
Power Automate
Unanswered

Parse XML with xpath returns[]

(0) ShareShare
ReportReport
Posted on by 77

Hi,  I want to extract the beared token from HTTP post request, which I need to use in next API calls. I'm getting the correct output in Body of HTTP.  From that body I need to extract the token. I tried using Xpath, but for some reason it keep on returning []. Can someone please help me with this. I'm kinda stuck here...

 

this is the expression I'm using  - 

xpath(xml(body('HTTP')), '//*[local-name()="AuthenticationResponseEx"]/*[local-name()="Token"]/text()')
Categories:
  • AbdulWahab Profile Picture
    517 on at

    Hi @pranavj619 ,

     

    Is this similar JSON written to your trigger?

    AbdulWahab_0-1679052170150.png

    I am wondering then why you are not getting it dynamically

    AbdulWahab_1-1679052220765.png

    I do not think there is a need to write highlighted part xpath(xml(body('HTTP')), '//*[local-name()="AuthenticationResponseEx"]/*[local-name()="Token"]/text()'). Replace/Grap it with dynamic content.

    If you need additional help please tag me in your reply and please like my reply.

     

    If my reply provided you with a solution, please mark it as a solution

     

    Thanks
    Regards,

     

    Abdul Wahab
    Power Platform & Customer Engagement Developer/Lead/Solution Architecture/Project Manager
    Direct/WhatsApp:+923323281237
    E-mail: abdulwahabubit@outlook.com
    Skype: abdul.wahabubit
    Linkedin: https://www.linkedin.com/in/abdul-wahab-a5b8b011a/
    Youtube Channel: https://www.youtube.com/channel/UCBjgLqLK_2kU-3bwo4McrTw

  • pranavj619 Profile Picture
    77 on at

    pranavj619_1-1679053110594.png

  • pranavj619 Profile Picture
    77 on at

    @AbdulWahab this is what I'm getting in HTTP response body..and I want to exreact whatever is there between the <Token> tag

     

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at
    xpath(outputs('Xml'), 'namespace-uri(//*[local-name()="JSon"])')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard