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

Community site session details

Session Id :
Copilot Studio - General
Suggested answer

Connecting to agents in Copilot Studio through Direct Line channel

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
Hi There,
 
As per my project requirements, I am trying to connect to agents created in Copilot Studio through Direct Line channel using Microsoft.Bot.Connector.DirectLine SDKI see the only option to generate token is using the secret provided in Copilot Studio (Settings -> Security -> Web channel security). For security reasons, we have been advised not to use any secrets.
 
My questions are - 
  • Is there a way to use certificates or managed identity to generate token for Direct Line channel.
  • How to generate the tokens based on user identity.
 
Thanks!
Categories:
I have the same question (0)
  • Suggested answer
    Robu1 Profile Picture
    1,433 Super User 2025 Season 2 on at
    Connecting to agents in Copilot Studio through Direct Line channel
    Hi ,
     
    Great questions! Here are some insights:
     
    Using Certificates or Managed Identity:
     
    Currently, the Direct Line channel primarily supports authentication using secrets or tokens generated from those secrets. However, you can use Managed Identity to generate access tokens for other Azure services, which might be a workaround depending on your architecture.
     
    Generating Tokens Based on User Identity:
    You can generate user-specific Direct Line tokens by leveraging an identity provider. This involves validating the user's identity and then acquiring a Direct Line token bound to that identity.
    This ensures that the bot receives a consistent and trustworthy user ID across sessions.
     
    For more detailed information, you can refer to the Direct Line Authentication documentation and the user-specific Direct Line token sample by Navzam below.
     
     
     
    If you need further assistance or have more questions, feel free to ask!If this fixes the issue, please mark as resolved to help others with find it.
     
     
    Happy to help
     
    Robu 1

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 364 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 53 Moderator

Last 30 days Overall leaderboard