Skip to content
LearningPathX
Learning PathsFree TestsExam InfoHow it worksNews
Sign inChoose a certification
  1. Home/
  2. Certifications/
  3. AB-400/
  4. AB-400 Learning Path/
  5. Study FAQs/
  6. How do I preserve a Copilot Studio conversation across turns in a custom app?

Study FAQ

How do I preserve a Copilot Studio conversation across turns in a custom app?

Exam · AB-400Knowledge domain · Extend Microsoft Power Platform (35–40%)Updated Nov 25, 2026
Also asked as 2
  • How should a client retain Copilot Studio conversation state for one signed-in user?
  • How can an application continue an agent conversation without mixing users' context?

Answer

Keep the Copilot Studio conversation's continuation state bound to the signed-in user and the configured agent and environment. The .NET Copilot Studio client sample starts the conversation with StartConversationAsync and sends input with AskQuestionAsync. Choose the client lifetime or explicit state storage so that the next turn uses the same intended conversation. Sharing a stateful client across users can expose one user's context to another.

To initialize app context through the documented web or native integration, wait for the first agent message, then send a custom event and handle it in an OnEventActivity topic. Pass only approved values such as a selected device reference or UI language. Track whether the event was handled before making context-dependent requests. Display returned message activities and handle status activity types separately.

Test a follow-up that depends on an earlier message, and repeat the same steps in a fresh second user's session. Verify the second session receives its own context only. On sign-out, clear continuation state and follow the application's retention rules for cached content. Keep any eventual business request ID separate from conversation state.

Microsoft references

  • Integrate with Copilot Studio
  • Integrate web or native apps with Microsoft 365 Agents SDK - Microsoft Copilot Studio
  • Agents/samples/dotnet/copilotstudio-client at main · microsoft/Agents · GitHub
  • Microsoft 365 Agents SDK .NET Copilot Studio conversation sample

Full explanation

AB-400: Integrating Foundry and Copilot Studio Agents

Study guide · AB-400

Read the full explanation →
← Back to AB-400 FAQsView learning path →

Related questions

How do I authorize callers of an Azure Function and let the Function access Dataverse with managed identity? →How do I make a long-running Dataverse job recoverable in Azure Functions? →How do I choose Azure Functions triggers and hosting for a Dataverse workload? →How should a Dataverse integration handle throttling and decide when to retry a write? →How do I diagnose a Dataverse application user that cannot access the target environment? →How do I submit a Dataverse background operation and verify whether it succeeded? →
LearningPathX

A focused path to certification, one clear step at a time.

© 2026 LearningPathX. All rights reserved.

Product

CertificationsLearning PathsFree TestsHow it worksNews

Company

SubscriptionHelp centerContact usPrivacyTerms

Follow us

Your privacy choices

We use analytics cookies to understand how LearningPathX is used and improve your learning experience. Analytics will only start after you accept.