Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Search for User (V2) with variable

(0) ShareShare
ReportReport
Posted on by 97

I'm probably missing something here but I have a variable that's a string type from a prior step called 'NameVariable'

 

to which I'm passing to the Search for users (V2), however results are coming up null.

But when I hard code 'John Doe' into the search it works.  What am I missing here? Do I need to convert the variable that's a string to something else? Compose also doesn't work.  

  • brindly Profile Picture
    24 on at
    Re: Search for User (V2) with variable

    Sorry about my previous message, It worked. 

  • brindly Profile Picture
    24 on at
    Re: Search for User (V2) with variable

    I'm seeing the same thing, When hard coded, the search string works fine, but when passed from a variable, its Null. Any idea please?

  • VictorIvanidze Profile Picture
    12,536 on at
    Re: Search for User (V2) with variable

    Well, just remove all \n from variable.

  • IncursioML1 Profile Picture
    97 on at
    Re: Search for User (V2) with variable

    It's coming from the text body of an HTML email.

     

    Here's the two outputs if using a variable vs. hardcode in the output.

    There's probably another step I have to do due to the HTML email conversion to text in which the variable is using the final output as a string.

     

    Output of Variable
    "searchTerm": "@variables('FinalBuyerName')",
    "searchTerm": "\n\nJohn Doe\n\n",

     

    Output of HarcCode
    "searchTerm": "John Doe",

  • VictorIvanidze Profile Picture
    12,536 on at
    Re: Search for User (V2) with variable

    Could you show Search for User (V2) with variable in edit mode?

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1