Imported from akhilsbehl/configs (
skills/query-ms-graph/SKILL.md). Install upstream withnpx skills add akhilsbehl/configs --skill query-ms-graph. Copyright stays with the author.
Query Microsoft Graph
Use query-ms-graph which should be in path:
query-ms-graph --name "Akhil Behl"
query-ms-graph --link "https://..." --output-dir "$PWD"
query-ms-graph --name "Akhil Behl" --link "https://..."
Good to know:
- Query by name - not email.
- Use full name if available
- Full name if matched will find the exact person (or multiple matches if available)
- Partial name matches FirstName and returns all names that match (fuzzy).
--output-dirdefaults to the caller's current working directory.- Pass a Linux path. The wrapper converts it for Windows PowerShell. Sharing links are opaque values. Quote them.
Authentication
The credentials should be cached but if auth fails, do not reattempt and just inform me to refresh auth cache.
Output and safety
- Directory results are JSON preceded by log lines.
- Successful downloads print the saved path.
- Surface a non-zero exit as an error. Do not silently retry authentication or Graph requests.
- Use
--debugonly when diagnosing a failure. It writes output to/tmp/ms-graph-debug-<timestamp>.logand prints the log path.