Skip to content

Support Entra ID authentication for Direct Line #8

@adilei

Description

@adilei

Summary

Add support for authenticated agents that require Entra ID (Azure AD) tokens to establish a Direct Line conversation.

Motivation

Many enterprise bots require user authentication via Entra ID before they can interact. Currently the library only supports Copilot Studio agents configured with "No authentication". Supporting Entra ID would unlock enterprise scenarios where:

  • The agent needs to know the user's identity
  • The agent calls downstream APIs on behalf of the user (OBO flow)
  • The organization requires authenticated access to the bot

Possible Approach

  • Add a data-webchat-auth attribute (e.g., entra)
  • Add data-webchat-client-id and data-webchat-tenant-id attributes
  • Use MSAL.js to acquire a token, then exchange it for a Direct Line token
  • Handle token refresh for long-running conversations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions