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 / How to get referer/URL...
Copilot Studio
Unanswered

How to get referer/URL from copilot

(0) ShareShare
ReportReport
Posted on by 12

Hello,

 

We are trying to retrieve the url or referer from which the copilot is executed.

For the moment we haven't found a solution, either using power automate or native functions.

 

Do any of you have an idea of how to retrieve the url of the chatbot execution?

 

Thanks a lot

I have the same question (0)
  • adilei Profile Picture
    on at

    You mean the URL for the page in which the copilot is embedded? You can pass that as a parameter: https://learn.microsoft.com/en-us/microsoft-copilot-studio/authoring-variables-bot?tabs=webApp#set-global-variables-in-an-embedded-bot 

  • BenoitG Profile Picture
    12 on at

    Hi Adilei,

    We tried like that with using Global, but it looks not work. We tested with endpoint, custom canvas and copilot embedded with query string (ex : &url=beta)

    But to get that query string from a topic for example, copilot ask a Global var with a predefine value; We cannot create a variable without default value, and that one looks always overwrite query string..

     

    Online documentation you provided indicate how to send query string, but not how to use it as global. Do you have any idea about that ?
    We only found that https://learn.microsoft.com/en-us/microsoft-copilot-studio/authoring-variables-bot?tabs=webApp not indicating how to manipulate query string.

     

    Kind regards

  • adilei Profile Picture
    on at
  • BenoitG Profile Picture
    12 on at

    right !

    it looks cache problem (on copilot ?.. or config), first time we get it, then the query string is always "old" value and overwrite with first value entered.
    I mean everytime we refresh browser (or private window), value is always the same..

  • adilei Profile Picture
    on at

    The value stays the same in your JavaScript? Or does it change and only the global variable stays the same?

  • BenoitG Profile Picture
    12 on at

    No, if I open on browser that URL :
    https://copilotstudio.microsoft.com/environments/Default-xxxxx/bots/xx/webchat?__version__=2&firstname=john&name=woo

    I'll get firstname & name

    if I change or refresh with https://copilotstudio.microsoft.com/environments/Default-xxxxx/bots/xx/webchat?__version__=2&firstname=betty&name=boop

    I'll get "john woo" displayed and not "betty boop" I want.

    We tried to play with "clear all variables" without success, like cache on bot side.

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 250 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 103 Moderator

Last 30 days Overall leaderboard