Share via

How to integrate Copilot Studio agent into a public Sitecore (.NET) website when "No authentication" is disabled?

Priya 0 Reputation points
2026-03-15T21:13:20.1666667+00:00

We are building an AI assistant using Microsoft Copilot Studio to help users search and navigate our website.

Our website is built using Sitecore (.NET). Some content on the website is publicly accessible, while other content is restricted and available only to authenticated users. Authenticated users should see copilot agent results that includes both public content and additional content they are authorized to access. whereas anonymous users should see only public content results from copilot agent.

What is the recommended approach to integrate a Copilot Studio agent into a website where:

Both anonymous and authenticated users can use the assistant

The assistant should return different results depending on the user’s authentication state or permissions?

Are there recommended patterns for passing user context or identity from the website to the Copilot Studio agent so that responses can be filtered based on access permissions?

Thank you in advance.

Microsoft Copilot | Microsoft Security Copilot
0 comments No comments

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-15T21:13:52.1366667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Yes, integration is possible, but not with anonymous users when “No authentication” is disabled. With that restriction, all supported patterns require authenticated identities.

    Key points from Copilot Studio behavior and supported options:

    1. “No authentication” is required for truly anonymous web embedding
      • The standard web embed (iFrame/Web Chat) and Agents Client SDK unauthenticated scenarios require the agent to be configured with No authentication under Settings → Security → Authentication.
      • When No authentication is selected:
        • The agent can be embedded via the default Web Chat embed code in a public website.
        • The Agents Client SDK for native apps currently supports only unauthenticated/anonymous users.
      • When a data policy requires authentication, the No authentication option is disabled and cannot be used, which also removes the default embed option and anonymous SDK usage.
      References from context:
      • The embed code is visible only if No authentication is selected; if Authenticate with Microsoft or Authenticate manually is selected, the embed code is not visible.
      • The Agents Client SDK for native apps “supports only unauthenticated users” and requires No Authentication on the agent.
    2. Manual authentication is for authenticated scenarios only
      • With Authenticate manually, Copilot Studio expects the client to handle identity and pass tokens; the agent does not treat users as anonymous.
      • Manual authentication is intended for:
        • Non‑Microsoft identity providers (custom OAuth, external IdPs).
        • Microsoft Entra–based user or service identities where the maker configures auth explicitly.
      • In this mode, the website or app must sign users in and then call the agent with a user token or service identity. There is no supported pattern in the context where the agent is exposed anonymously while the agent is configured for manual authentication.
    3. How to make the agent available to all users under Manual Authentication
      With No authentication disabled, “all users” must mean “all users who can authenticate via the chosen identity provider.” Supported patterns from the context:
      • Use Microsoft 365 Agents SDK with user sign‑in:
        • Configure an app registration in Microsoft Entra ID.
        • Grant the app the Copilot Studio.Copilots.Invoke delegated permission on the Power Platform API.
        • Integrate the Copilot Studio client (Agents SDK) into the Sitecore site and use interactive sign‑in (OAuth) to obtain a user token.
        • Use the connection string or traditional configuration (Environment ID, Tenant ID, Schema name) from the agent to connect.
      • Flow in the website:
        • Anonymous visitor: show a “Sign in to use the assistant” entry point.
        • After sign‑in (Microsoft Entra or other configured IdP), initialize the Copilot Studio client with the user’s token and connect to the agent.
        • This satisfies the requirement that the agent only works with authenticated users and aligns with the manual authentication model.
      In this model, the agent is not available to truly anonymous users; it is available to any user who can authenticate.
    4. Differentiating anonymous vs authenticated users for different results
      • With No authentication disabled, Copilot Studio does not support anonymous users at all in the documented integration patterns; the client must always provide an authenticated identity.
      • The behavior described in the security FAQ is that Copilot Studio tailors responses based on “who is speaking” and their permissions. When the agent uses authenticated identities (for example, Microsoft Entra ID), the agent and connected knowledge sources (like SharePoint) enforce access so that users only see content they are allowed to see.
      • This means:
        • Public vs restricted content separation is handled by the underlying permissions on the knowledge sources and the user’s identity.
        • There is no need for the agent to explicitly detect “anonymous vs authenticated” because anonymous access is not supported when authentication is required; instead, different authenticated users see different content based on their permissions.
      To approximate “anonymous vs authenticated” behavior under these constraints:
      • Treat “anonymous” as “not signed in yet” at the Sitecore layer and do not connect to the agent until the user signs in.
      • After sign‑in, the agent uses the user’s identity and the knowledge source permissions to decide which content can be surfaced.
    5. Supported and secure approach under the given constraints
      Based on the context, a supported and secure pattern that complies with Copilot Studio and Microsoft Entra constraints is:
      1. Configure the agent with Authenticate manually.
      2. Use Microsoft Entra ID (or another supported OAuth provider) for user sign‑in on the Sitecore site.
      3. Configure an app registration with Copilot Studio.Copilots.Invoke delegated permission on the Power Platform API.
      4. Integrate the Microsoft 365 Agents SDK client into the Sitecore app, using either:
        • The agent’s connection string from the Channels page, or
        • Environment ID, Tenant ID, Schema name from Settings → Advanced → Metadata.
      5. Only initialize the Copilot client after the user is authenticated and a token is available.
      6. Rely on the user’s identity and knowledge source permissions (for example, SharePoint permissions, sensitivity labels, DLP) so that:
        • Users with access to restricted content see both public and restricted results.
        • Users without access see only public content.
      Under these constraints, there is no supported pattern in the context where the same Copilot Studio agent is embedded and usable by completely anonymous users while No authentication is disabled.

    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.