Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Answered

Using a global variable in the body of a http request in copilot studios

(1) ShareShare
ReportReport
Posted on by 34
I'm making a http request to change a users password. I'm trying to set the password to a global variable that has been previously set within the flow.
 
I've tried multiple methods, listed below with the results, but nothing has worked. I have set my body to formula.
 
Method 1:
{
  password: Global.password
}
 
Got a 400 for this
 
Method 2:
{
  password: "Global.password"
}
 
This set the password to the variable name and not the variable value.
 
Method 3 (Suggested by Copilot AI):
{
  password: "{{Global.password}}"
}
Again set the password to everything within the " " and not the actual variable value.
Categories:
  • Vinoth Selvam Profile Picture
    1,560 Super User 2025 Season 1 on at
    Using a global variable in the body of a http request in copilot studios
    Please use the PowerFx expression in your case:
     
    Concatenate("{'password':", Global.password, "}")
  • Verified answer
    Pstork1 Profile Picture
    67,060 Most Valuable Professional on at
    Using a global variable in the body of a http request in copilot studios
    Sorry, previous answer was for Power Automate, which you could use inside Copilot studio to do the call. If you want to do it using advanced try setting the body to raw and use the following Power FX formula
     
    Concatenate("{'password':", Global.password, "}")
  • Suggested answer
    Pstork1 Profile Picture
    67,060 Most Valuable Professional on at
    Using a global variable in the body of a http request in copilot studios
    You need to insert the password using the dynamic content dialog and selecting the variable from the list. The result should look something like this.  The JSON for the variable is variables('password') if password is the name of the variable.

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 > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 169 Super User 2025 Season 1

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 150

#3
sandeep_angara Profile Picture

sandeep_angara 75