Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(connections): single prompt value for M365/Teams OAuth (fix AADSTS90023) (#4257)

Louis Beaumontd8538c197ea8
diff --git a/crates/screenpipe-connect/src/connections/microsoft365.rs b/crates/screenpipe-connect/src/connections/microsoft365.rs
index ec2ce9952..a7a344eee 100644
--- a/crates/screenpipe-connect/src/connections/microsoft365.rs
+++ b/crates/screenpipe-connect/src/connections/microsoft365.rs
@@ -39,7 +39,10 @@ static OAUTH: OAuthConfig = OAuthConfig {
// select_account so a second connect shows Microsoft's account picker
// instead of silently consenting under the already-signed-in account —
// otherwise "add another account" can never reach a different tenant.
- ("prompt", "consent select_account"),
+ // NOTE: Microsoft Entra rejects multiple space-separated prompt values
+ // with AADSTS90023 ("Unsupported 'prompt' value"), so we send only
+ // select_account. First-time consent is still prompted automatically.
+ ("prompt", "select_account"),
],
redirect_uri_override: None,
};
diff --git a/crates/screenpipe-connect/src/connections/teams.rs b/crates/screenpipe-connect/src/connections/teams.rs
index 167da4a2b..f3e83af20 100644
--- a/crates/screenpipe-connect/src/connections/teams.rs
+++ b/crates/screenpipe-connect/src/connections/teams.rs
@@ -28,7 +28,10 @@ static OAUTH: OAuthConfig = OAuthConfig {
),
// select_account so a second connect shows Microsoft's account picker
// instead of silently consenting under the already-signed-in account.
- ("prompt", "consent select_account"),
+ // NOTE: Microsoft Entra rejects multiple space-separated prompt values
+ // with AADSTS90023 ("Unsupported 'prompt' value"), so we send only
+ // select_account. First-time consent is still prompted automatically.
+ ("prompt", "select_account"),
],
redirect_uri_override: None,
};