Building and customizing solutions using Microsoft 365 Copilot APIs and tools
Hello DOI,
Teams and Declarative Agents don’t provide a built-in way for users to manually clear stored OAuth credentials. Tokens are centrally managed by the Bot Framework Token Service and can persist even after app uninstall due to SSO caching, tenant settings, and client differences. The correct way to force re-authentication is to call SignOutUserAsync on the server to invalidate bot tokens, optionally combined with Microsoft Graph’s revokeSignInSessions or manual consent removal for a full reset. The recommended approach is to expose a “Log out / switch account” action that triggers these server-side sign-out flows, ensuring users are prompted to sign in again cleanly.
Reference Document:-
https://learn.microsoft.com/en-us/training/modules/copilot-declarative-agent-api-plugin-auth/