मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)40k · #7298

msgraph-sdk

यह क्या करती है

यह टूल डेवलपर्स को अपने प्रोग्राम को Microsoft 365 के डेटा जैसे ईमेल, कैलेंडर और फ़ाइलों से जोड़ने में मदद करता है। यह authentication और Microsoft फ़ंक्शन कॉल करने के काम को आसान बनाता है।

कब इस्तेमाल करें

  • ✓ऐसा ऐप बनाते समय जिसे किसी अकाउंट के ईमेल पढ़ने हों।
  • ✓ऐसा प्रोग्राम बनाते समय जो कैलेंडर में मीटिंग शेड्यूल करे।
  • ✓ऐसा सिस्टम बनाते समय जो OneDrive या SharePoint में फ़ाइलें मैनेज करे।

Skill का लिंक

https://github.com/github/awesome-copilot/blob/main/skills/msgraph-sdk/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/github/awesome-copilot/blob/main/skills/msgraph-sdk/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं अपने Python ऐप को Microsoft 365 में यूज़र के डेटा से कैसे जोड़ूँ?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

प्रोग्राम एक 'SDK' इस्तेमाल करता है, यानी पहले से बने टूल का एक सेट, जो Microsoft सर्विसेज़ से बात करता है। यह सुरक्षा (कौन क्या एक्सेस कर सकता है) और डेटा लाने या बदलने की रिक्वेस्ट को संभालता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Microsoft Graph SDK

Use this skill when integrating Microsoft Graph into an application to access Microsoft 365 data and services.

Always ground implementation in the current Microsoft Graph SDK documentation and SDK version for the target language rather than relying on memory alone.

Determine the target language first

  1. Use the .NET workflow when the project contains .cs, .csproj, or .sln files, or when the user asks for C# guidance. Follow references/dotnet.md.
  2. Use the TypeScript / JavaScript workflow when the project contains package.json, .ts, or .js files, or when the user asks for Node.js / browser guidance. Follow references/typescript.md.
  3. Use the Python workflow when the project contains .py, pyproject.toml, or requirements.txt, or when the user asks for Python guidance. Follow references/python.md.
  4. If multiple languages are present, match the language of the files being edited or ask the user.

Always consult live documentation

Authentication — choose the right pattern

Selecting the wrong auth flow is the most common Graph integration mistake. Apply this decision tree before writing any auth code:

Scenario Flow to use
Background service / daemon with no user Client credentials (app-only)
Agent or API acting on behalf of a signed-in user On-Behalf-Of (OBO)
App running in Azure (Function, Container App, VM) Managed Identity (preferred over secrets)
CLI tool or local dev script Device code or interactive browser
Single-page app (browser only) Authorization code + PKCE
  • Never use client credentials when a user context is required — Graph enforces this at the permission level (application vs. delegated).
  • Prefer DefaultAzureCredential in Azure-hosted apps; it tries managed identity first and falls back gracefully for local dev.
  • Never hardcode secrets. Use environment variables, Azure Key Vault, or the Secret Manager.

Core SDK usage patterns

Building the client

Always construct GraphServiceClient once and reuse it (it manages token caching internally).

Pass a credential from the Azure Identity library — never build raw HTTP clients manually.

Making calls

  • Use the fluent builder API: client.Users[userId].Messages.GetAsync(...).
  • Always await async calls.
  • Specify $select to limit returned fields — Graph returns large default payloads.
  • Use $filter server-side rather than filtering returned collections in memory.
  • Use $expand to fetch related resources in a single call when relationships are small.

Pagination

Graph paginates collections. Never assume all items arrive in one response:

  • Check for an @odata.nextLink on the response.
  • Use the SDK's PageIterator helper (available in all three SDKs) to walk pages automatically.
  • Set $top to control page size (max varies by resource, typically 999).

Advanced patterns

Batch requests

Combine up to 20 independent Graph calls into a single HTTP request using the $batch endpoint. Use batching when:

  • Initializing data for a dashboard or agent that needs multiple resources upfront.
  • Reducing latency in high-call-count operations.

Batch responses arrive out of order — match them by the id field you assigned each request.

Delta queries

Use delta queries to sync changes incrementally instead of polling full collections:

  • First call: GET /users/delta returns all items + a @odata.deltaLink.
  • Subsequent calls: use the deltaLink to receive only what changed since the last sync.
  • Supported on: users, groups, messages, calendar events, Teams channels, and more.
  • Store the deltaLink durably (database, blob) between sync runs.

Change notifications (webhooks)

Subscribe to resource changes with POST /subscriptions:

  • Graph delivers change events to your HTTPS notification URL.
  • Subscriptions expire — renew them before expirationDateTime (max varies by resource; typically 1–3 days for mail/calendar, up to 4230 minutes for users/groups).

…

अक्सर पूछे जाने वाले सवाल

Microsoft Graph क्या है?

यह Microsoft 365 के डेटा और सर्विसेज़ का दरवाज़ा है, जैसे यूज़र, मेल, कैलेंडर और फ़ाइलें।

SDK क्या है?

SDK का मतलब Software Development Kit है, यानी टूल्स का एक सेट जिससे किसी खास सर्विस से जुड़े प्रोग्राम बनाना आसान हो जाता है। इस मामले में वह सर्विस Microsoft Graph है।

authentication की चिंता क्यों करनी पड़ती है?

Authentication पक्का करता है कि डेटा सिर्फ़ अधिकृत यूज़र या ऐप्स ही एक्सेस करें, जिससे संवेदनशील जानकारी सुरक्षित रहती है।

जानकारी

लेखक का मूल विवरण

Integrate Microsoft Graph SDK into any project — .NET, TypeScript/JavaScript, or Python. Covers auth patterns (client credentials, OBO, managed identity), SDK setup, calling Graph APIs, batching, delta queries, change notifications, throttling, and permission scopes. Use when accessing Microsoft 365 data (users, mail, calendar, Teams, files, SharePoint) from any application type.

repo: github/awesome-copilot

लोकप्रियता

GitHub स्टार
40k
रैंकिंग में स्थान
#7298
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

acquire-codebase-knowledge

40k

आपके एजेंट को किसी मौजूदा code प्रोजेक्ट को समझने और उसका documentation बनाने में मदद करता है। यह नए लोगों को प्रोजेक्ट से जोड़ने या architecture का सार जानने में उपयोगी है।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-assess

40k

आपके एजेंट को किसी प्रोजेक्ट की AI के लिए तैयारी जाँचने और रिपोर्ट बनाने देता है। यह समझने में उपयोगी है कि प्रोजेक्ट AI tools इस्तेमाल करने के लिए कितना तैयार है।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-generate-instructions

40k

आपके एजेंट को assessment के आधार पर AI tools के लिए निर्देश बनाने में मदद करता है। यह बताता है कि AI कोड के साथ बेहतर कैसे काम करे और पहचानी गई कमियाँ कैसे दूर हों।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-policy

40k

आपके एजेंट को AI प्रोजेक्ट assessment के लिए नीतियाँ तय करने या लागू करने में मदद करता है। यह प्रोजेक्ट्स के मूल्यांकन को मानक बनाने और compliance सुनिश्चित करने में उपयोगी है।

AI और एजेंटएजेंट

मिलती-जुलती skills