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 - Publish & Channel Management
Unanswered

Integrating Copilot Studio Agent into a Web App Using Agents SDK Without User Sign-In

(0) ShareShare
ReportReport
Posted on by

I want to integrate my Copilot Studio agent into a web application using the Agents SDK. The official documentation provides a method called “Connect to Copilot Studio with Agents SDK User Sign-in”, which requires end-user authentication. However, in my use case, I need the agent to be accessible to end-users without requiring sign-in.

I’m aware that the “Default Web Chat Embed Code” method can achieve this, but it does not allow customization of the chat UI, which is a requirement for my application.

Has anyone implemented a similar scenario? If yes, please share your approach or suggestions.

Categories:
I have the same question (0)
  • sannavajjala87 Profile Picture
    143 on at
    Integrating Copilot Studio Agent into a Web App Using Agents SDK Without User Sign-In

    You’re not missing anything, this is mostly a current platform limitation rather than a config issue.

    What’s supported today

    For web scenarios you basically have three options (as you already spotted in the docs):

    Default Web Chat Embed (No Authentication)

    Allows anonymous / no sign-in

    Very limited UI customization (you’re essentially using the built-in web chat)

    Agents SDK with user sign-in

    • Full control over the chat UI and client experience
    • Uses the end user’s Entra ID identity (good for Graph / line-of-business data)

    Requires user authentication – there’s no “anonymous” mode here today

    Legacy DirectLine

    • Lets you build a completely custom web UI
    • Does not require end-user sign-in (you can treat the bot as app-identity backed)

    Considered “legacy” and should be used only where Agents SDK doesn’t yet fit your scenario

    Key point

    • Agents SDK is currently designed for authenticated, user-centric experiences.
    • There’s no supported way right now to use the Agents SDK directly from the browser without user sign-in.

    That’s why your scenario (custom UI + no user sign-in) can’t be achieved purely with the “Connect to Copilot Studio with Agents SDK User sign-in” option.

    Available Options:

    If anonymous access is a hard requirement

    • Use the Default Web Chat Embed Code for now, and style around the iframe (header, footer, background) to match your app as much as possible.
    • Or use legacy DirectLine with a small backend that:
    • Keeps the DirectLine secret server-side
    • Issues short-lived DirectLine tokens to your web app
    • Your custom web chat uses that token to talk to the agent
    This gives you custom UI + no end-user sign-in, but you lose user-context features (Graph, per-user permissions, etc.).
    If you can allow sign-in later
    • Stick with the Agents SDK and plan for a signed-in experience:
    • Better security posture
    • Access to user-scoped data sources
    • Cleaner long-term path as DirectLine is “legacy”.
  • KS-17111010-0 Profile Picture
    on at
    Integrating Copilot Studio Agent into a Web App Using Agents SDK Without User Sign-In

    Right now, the Agents SDK in Copilot Studio cannot be used without user sign-in. The SDK is built to work only with authenticated users because it needs Azure AD identity to run actions securely. That is why the documentation only shows the “Connect to Copilot Studio with Agents SDK User Sign-in” method.

    If you want users to access the agent without signing in, Microsoft currently provides only two workable options:

    1. Use the default Web Chat Embed (Anonymous Access)

    This method supports fully anonymous usage and works out-of-the-box, but the UI cannot be deeply customized. You can only do basic styling through the container or CSS. If you only need a simple embed, this is the only supported front-end option.

    2. Build a Custom UI + Call the Agent Through Your Backend (Service/Server Identity)

    If you need a fully custom chat UI but still want the user to remain anonymous, you must call the agent from your backend instead of the browser.

    Here is how it works:

    1. Your web app has no login.
    2. Your backend authenticates with Azure AD using a confidential client (client secret or managed identity).
    3. The backend calls the Copilot agent using the Agents SDK or REST endpoint.
    4. Your UI simply displays the messages returned by your backend.

    This pattern is commonly used when teams need custom chat interfaces while keeping users anonymous. It keeps your credentials secure and still allows you to fully control the front-end experience.

    At the moment, Microsoft does not offer a direct “anonymous SDK” authentication method.

    Thank you.
    Karan Shewale.
    If this response resolves your issue, please Accept the answer and, if helpful, click the “Upvote” button. Your feedback helps us improve and assist others more effectively.
     

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

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

Leaderboard > Copilot Studio

#1
Romain The Low-Code Bearded Bear Profile Picture

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 224 Super User 2025 Season 2

#3
Sam_Fawzi Profile Picture

Sam_Fawzi 78 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics