شعار Microsoft 365

Microsoft 365

المجتمع
arozumenko
microsoft-365

Use when the user asks to 'check my email/Teams/calendar', 'what meetings do I have', 'any messages about X', or whenever a task needs live Microsoft 365 data rather than memory. Microsoft 365 (Graph) access to email, Teams, calendar, and SharePoint — scriptable scans plus an interactive query.py.

نظرة عامة

الناشرarozumenko
المستودعsdlc-skills
اسم المهارةmicrosoft-365
النجوم
26
التفريعات
10
الملفات المرفقة
23
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 23

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها arozumenko على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Microsoft 365 في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/arozumenko/sdlc-skills/tree/main/skills/microsoft-365
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/arozumenko/sdlc-skills.git /tmp/sdlc-skills
mkdir -p .claude/skills
cp -r /tmp/sdlc-skills/skills/microsoft-365 .claude/skills/microsoft-365
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Microsoft 365 في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Microsoft 365 تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Microsoft 365 بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Microsoft Graph Skill

Provides Microsoft 365 data access via the Microsoft Graph API. Two operating modes:

Mode 1 — LLM-less Scan Scripts (Scheduled)

Four scripts run autonomously on a schedule without involving an LLM:

ScriptWhat it scans
scripts/scan-email.pyInbox messages newer than --since
scripts/scan-teams.pyTeams channel messages newer than --since
scripts/scan-calendar.pyCalendar events starting within --since window
scripts/scan-sharepoint.pySharePoint/OneDrive files modified within --since

Common CLI arguments

--since     Lookback window, e.g. 1h, 4h, 24h, 7d  (default: 1h)
--output    Path for JSON output                     (default: m365-inbox.json)
--relay     Path to a script or webhook to call when items are found
--role      Role name passed to the relay for routing

Per-script additional arguments

ScriptExtra flagPurpose
scan-email.py--sender boss@company.comFilter to a specific sender
scan-teams.py--team-id TEAM_IDLimit to a single team
scan-calendar.py--hours-ahead 24Look forward N hours instead of backward
scan-sharepoint.py--site-id SITE_IDScan a SharePoint site instead of personal OneDrive

How results are delivered

  1. If no items are found the script exits silently (exit code 0).
  2. If items are found they are appended (not overwritten) to --output as a JSON array.
  3. If --relay is provided the script calls:
    python3 <relay> --role <role> --data <output_path>
    The relay script is called with the found items and is responsible for any further routing or notification.

Output record shape

Every item in the output JSON array has the following fields:

json
{
  "source":  "email | teams | calendar | sharepoint",
  "ts":      "2026-04-04T11:00:00+00:00",
  "summary": "one-line description",
  "detail":  { /* raw API fields */ },
  "urgent":  false
}

Example cron entry

0 * * * *  cd /path/to/project && python3 scripts/scan-email.py --since 1h --relay scripts/notify.py --role triage

Mode 2 — Interactive Query via Claude (Bash Tool)

scripts/query.py is called by Claude during a session when the user asks about their Microsoft 365 data.

Typed subcommands (recommended):

bash
python3 scripts/query.py email --filter "isRead eq false" --select "subject,from" --top 20
python3 scripts/query.py teams channels --team-id TEAM_ID
python3 scripts/query.py teams messages --team-id TEAM_ID --channel-id CHANNEL_ID --top 20
python3 scripts/query.py calendar --start 2026-04-04 --end 2026-04-11
python3 scripts/query.py sharepoint files --drive-id DRIVE_ID --path /Documents

Sample file mode:

bash
python3 scripts/query.py --sample samples/email/unread-today.yaml

Raw endpoint mode:

bash
python3 scripts/query.py --endpoint "/me/messages" --filter "isRead eq false" --select "subject,from" --top 20
python3 scripts/query.py --endpoint "/me/calendarView" --params "startDateTime=2024-01-01T00:00:00Z&endDateTime=2024-01-07T23:59:59Z"

Results are printed as pretty-printed JSON to stdout. Claude reads and summarises them for the user. All pages are fetched automatically via @odata.nextLink pagination.

Sample YAML files in samples/ describe pre-built queries that Claude can run by name.

Authentication

Scripts auto-install Python dependencies (from requirements.txt) into ~/.msgraph-skill/.venv/ on first run — no manual pip install or venv creation needed. A built-in Azure AD app ID is used by default, so no environment variables or Azure portal setup is required for most users.

Token cache is stored at ~/.msgraph-skill/token_cache.json (shared across all projects — authenticate once, use everywhere).

Login flow (important for Claude)

The default login opens an interactive browser (auth-code + PKCE on a localhost redirect). This passes Conditional Access policies that block the device-code flow. Because it needs a browser + a local redirect listener, ask the user to run it in their own terminal:

python3 scripts/auth.py login            # Browser auth-code+PKCE (default)
python3 scripts/auth.py status           # Check token validity
python3 scripts/auth.py logout           # Clear cached credentials

If the browser flow can't be used (no GUI / SSH), fall back:

python3 scripts/auth.py login device     # Device-code — relay LOGIN_URL/LOGIN_CODE to user
python3 scripts/auth.py login authcode   # Browser via nativeclient redirect (manual URL paste)

For login device, the output contains LOGIN_URL=... and LOGIN_CODE=... — relay both to the user. Note: many tenants block device-code via Conditional Access ("...an authentication flow that is restricted by your admin"); prefer the default browser flow.

Environment variables (optional)

VariableDefaultDescription
SDLC_SKILLS_CACHE_DIR~/.msgraph-skillShared cache root for all sdlc-skills (token cache, venv). When set, the skill stores its data under $SDLC_SKILLS_CACHE_DIR/msgraph/.
MSGRAPH_CLIENT_ID3d7688c6-f449-4d04-8b0d-57d94818e922Public client with localhost redirect; override with your own Azure AD app
MSGRAPH_TENANT_IDcommonRestrict to a specific tenant

Variables can be set via environment or in a .env file at the skill root or cwd. Most users do not need to set these.

Custom Azure AD app (advanced)

If your organisation blocks third-party app IDs or you need additional permissions, register your own Azure AD app:

  1. Azure portal → App registrations → New registration.
  2. Add delegated permissions: Mail.Read, Calendars.Read, Team.ReadBasic.All, Channel.ReadBasic.All, Sites.Read.All, Files.Read.All.
  3. Under Authentication → Add platform → Mobile and desktop, enable the http://localhost redirect URI (required for the default browser flow).
  4. Set MSGRAPH_CLIENT_ID=<your-app-id> in your .env and re-run login.

Installation

Claude Code plugin marketplace

/plugin marketplace add arozumenko/sdlc-skills
/plugin install microsoft-365@sdlc-skills

Direct install via npx

bash
npx github:arozumenko/sdlc-skills init --skills microsoft-365 --target claude

Python dependencies are installed automatically into ~/.msgraph-skill/.venv/ on first script run — no manual setup needed.

First-time authentication

bash
python3 scripts/auth.py login

Known issues / troubleshooting

  • Conditional Access blocks device-code — Error: "Your sign-in was successful but does not meet the criteria to access this resource ... an authentication flow that is restricted by your admin." Many tenants block the device-code flow via Conditional Access. This is why the default login now uses the interactive browser (auth-code + PKCE) flow. If you still see this message after the browser sign-in, the CA policy is keying on device compliance / managed app / location rather than the auth flow — that needs your tenant admin (check Entra → Sign-in logs → your sign-in → Conditional Access tab for the exact policy).

  • AADSTS50011 redirect URI mismatch — The configured MSGRAPH_CLIENT_ID app has no http://localhost redirect registered. The default app does; if you override it with your own app, register the http://localhost redirect (Authentication → Mobile and desktop applications). The legacy device-code flow (login device) needs no redirect URI if you must avoid this.

  • Default app is a shared public client — 3d7688c6-... is a third-party public-client app reused because it has the http://localhost redirect. It is not controlled by this project. For a durable / auditable setup, register your own Azure AD app (see Custom Azure AD app above) and set MSGRAPH_CLIENT_ID.

  • Teams scopes may not consent on the default app — The default app's registered scopes do not include Team.ReadBasic.All / Channel.ReadBasic.All. Mail, calendar, and SharePoint work; Teams scans may fail with a consent error. Use your own app registration with all six delegated permissions if you need Teams.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Microsoft 365؟

Use when the user asks to 'check my email/Teams/calendar', 'what meetings do I have', 'any messages about X', or whenever a task needs live Microsoft 365 data rather than memory. Microsoft 365 (Graph) access to email, Teams, calendar, and SharePoint — scriptable scans plus an interactive query.py.

لماذا تستخدم Microsoft 365 على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Microsoft 365 عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Microsoft 365 في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/arozumenko/sdlc-skills/tree/main/skills/microsoft-365. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Microsoft 365؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Microsoft 365؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Microsoft 365 معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Microsoft 365 مجانية؟

نعم. نشرها arozumenko على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇