Skip to main content

Notifications

Copilot Studio - General
Suggested answer

Connecting to agents in Copilot Studio through Direct Line channel

(0) ShareShare
ReportReport
Posted on by
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:
  • Suggested answer
    Robu1 Profile Picture
    Robu1 918 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

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,858

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,505

Leaderboard