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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Embedding copilot stud...
Copilot Studio
Answered

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 410

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 160 Super User 2026 Season 1

#3
chiaraalina Profile Picture

chiaraalina 63 Super User 2026 Season 1

Last 30 days Overall leaderboard