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 / Embedding copilot stud...
Copilot Studio
Unanswered

Embedding copilot studio bot into custom angular web app with Direct Line Token

(1) ShareShare
ReportReport
Posted on by 4

Hello,

 

I have a web application written in the latest version of Angular that I am trying to embed a microsoft chat bot into. For security purposes I was hoping to leverage a direct line token and hence have enabled "Require secured access" in Web channel security.

 

I am able to generate the token successfully server-side and am trying to use this token in the query string of an iframe with the url looking something like 

 

 

 

https://copilotstudio.microsoft.com/environments/{botEnvironment}/bots/{botReference}/webchat?__version__=2&t={token}

 

 

 

My chatbot window does not load. Looking at the developer tools I see a 404 for the following request URL (environment and bot references abstracted)

 

 

https://{botEnvironment}.d2.environment.api.powerplatform.com/powervirtualagents/botsbyschema/{botReference}/webchatsettings?api-version=2022-03-01-preview

 

 

 

Is anyone able to assist me in identify what I am doing wrong? I have no issues communicating with my server from within copilot studio, just when trying to host the iframe within my web app.

 

Categories:
I have the same question (0)
  • Verified answer
    CU22081450-0 Profile Picture
    Most Valuable Professional on at

    Hi @JacDomney ,

     

    They have changed a little bit the way to implement this bot as an iframe.

    You could change the following parameters "_____here___" by using the Copilot Studio >> Settings >>Copilot details >> Advanced on the left-hand side.

    https://web.powerva.microsoft.com/environments/______ENVIRONMENTID_____/bots/______SCHEMANAME______/webchat?__version__=2 

  • JacDomney Profile Picture
    4 on at

    Thanks @renatoromao 

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

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard