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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Using a global variabl...
Copilot Studio
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:
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    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.
  • Verified answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    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, "}")
  • Vinoth Selvam Profile Picture
    1,590 Super User 2025 Season 2 on at
    Please use the PowerFx expression in your case:
     
    Concatenate("{'password':", Global.password, "}")

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 251 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 201 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard