Your AI agent won't email the CEO at 3am.
Not because there's a setting. Not because there's a policy. Because the code physically cannot send emails. We removed that capability the way you'd remove a chainsaw from a toddler — completely and without negotiation.
Extract from the Teams tab, NOT Outlook. Classic Outlook no longer exists in most orgs, and new Outlook uses PoP tokens that can't be extracted. The Teams tab provides an MSAL refresh token (90-day, auto-rotating) that powers both this skill and the teams-hack skill.
Open Microsoft Teams (teams.cloud.microsoft) in Chrome with the OpenClaw browser relay attached. Then run this in-browser evaluation:
(() => {
const keys = Object.keys(localStorage).filter(
(k) => k.includes("refreshtoken") || k.includes("RefreshToken"),
);
const parsed = JSON.parse(localStorage.getItem(keys[0]));
const accountKeys = Object.keys(localStorage).filter((k) => {
try {
return JSON.parse(localStorage.getItem(k)).tenantId;
} catch {
return false;
}
});
let tenantId = null;
for (const k of accountKeys) {
try {
tenantId = JSON.parse(localStorage.getItem(k)).tenantId;
break;
} catch {}
}
return { secret: parsed.secret, tenantId };
})();
Save the token via the teams CLI (NOT the outlook-mail-fetch script):
teams token store --refresh-token "<secret>" --tenant-id "<tenantId>"
node {baseDir}/scripts/outlook-mail-fetch.mjs --test
# Last 6 months (default)
node {baseDir}/scripts/outlook-mail-fetch.mjs --fetch-all
# Custom range
node {baseDir}/scripts/outlook-mail-fetch.mjs --fetch-all --months 12
Output: ~/.openclaw/workspace/data/outlook-emails/
raw-emails.jsonl — full email data (subject, from, to, body text, preview)attachments-index.jsonl — every attachment per messageemail-summary.md — readable digest with stats and per-email summaries| Source | Token Type | Extractable? | Lifetime |
|---|---|---|---|
| --------------------------------------- | ------------------------------- | ------------------ | ----------------------- |
Teams (teams.cloud.microsoft) | MSAL refresh token | ✅ Yes | 90 days, auto-rotates |
New Outlook (outlook.cloud.microsoft) | PoP token (Proof-of-Possession) | ❌ No | Crypto-bound to browser |
Classic Outlook (outlook.office.com) | Bearer access token | ⚠️ Deprecated/gone | Most orgs migrated |
Always extract from the Teams tab. New Outlook uses Proof-of-Possession tokens that cannot be extracted or replayed. Classic Outlook is deprecated and no longer available in most orgs.
localStorage to extract the MSAL refresh tokenteams token storeteams-hack share ~/.openclaw/credentials/outlook-msal.json (0600)outlook-mail-fetch.mjs script uses the Graph API access token for mail operationsThe skill is NOT scraping the page. It speaks Outlook's own REST API, authenticated through your existing browser session.
teams-hack)Pair with whatsapp-ultimate for messaging and jarvis-voice for voice.
共 2 个版本