Support Entra ID authentication for Direct Line

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript

Research direction

No files, tests, or entry points are named. Start by locating the embed SDK's handling of data-webchat attributes and its Direct Line token exchange, then assess the proposed Entra ID attributes, MSAL.js acquisition, and token refresh. Done should include authenticated conversation establishment and refresh for long-running conversations.

Written by the indexing model from the issue text.

Description

enhancement

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
Dominant language
JavaScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/botframework-webchat-embed

All issues in microsoft/botframework-webchat-embed

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.