Hey @Le Crosst ,
for Outlook: pass the shared mailbox address in the user_id parameter (e.g. shared@yourdomain.com instead of me). Works for both delegated and S2S/application auth - delegated access has to be granted in your Microsoft tenant first.
For Gmail: shared mailboxes work differently - either auth as a user with delegated access, or use Google Workspace domain-wide delegation. Easiest is to connect the shared account directly if you have its credentials.
Lmk if this helps.