heyyyy guys ! please help i am facing issues while integrating composio outlook send mail action in my fast api (langraph agent + composio)
so when i am testing api through fast api it is not sending mail even after composio auth2.o authentication
Composio’s Google Docs integration relies solely on your Composio API key (server‑to‑server), whereas the Outlook “send email” action requires a user’s OAuth consent and a connected account. An API key authenticates your application to Composio’s backend
Composio Docs
, but it does not grant Composio permission to act on behalf of a specific Microsoft user. To send mail via Outlook, you must establish an OAuth connection for that user (e.g. composio add outlook), after which Composio stores the necessary tokens and scopes to invoke OUTLOOK_OUTLOOK_SEND_EMAIL
********************* Outlook Requires OAuth & Connected Account*********************
--- The Outlook send‑mail action leverages Microsoft Graph and must send mail as a user. An API key alone cannot impersonate a mailbox
Composio Docs
--- You need to perform an OAuth 2.0 flow (composio add outlook) so that Composio can obtain and store refresh/access tokens tied to a real user account
Composio
--- Once connected, Composio checks your stored credentials at runtime (check_connected_account) and then issues Graph API calls on your behalf. Without that, you get the “No connected account” error.
***********************Why an API Key Isn’t Enough for Outlook*************************
User‑Scoped Permissions
--- Sending mail requires Mail.Send permissions granted by an end user. API keys cannot carry those user consents
Token Refresh & Security
---OAuth flows issue access tokens with limited lifetimes and refresh tokens for renewal. Composio’s API key cannot renew Microsoft tokens.
Audit & Compliance
---Mail services log actions per user identity. OAuth ensures actions are auditable under the actual user’s mailbox, not under a generic application key.