As per my project requirements, I am trying to connect to agents created in Copilot Studio throughDirect Line channel using Microsoft.Bot.Connector.DirectLine SDK. I 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.
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
Was this reply helpful?YesNo
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.