Call Microsoft Graph directly
graph_requestSend an arbitrary Microsoft Graph API request and get the raw JSON response, useful when no dedicated tool covers the endpoint.
Instructions
Sends an arbitrary request to Microsoft Graph and returns the raw JSON response. Use this only when no purpose-built tool covers the endpoint: the dedicated tools project and trim their results, while this one returns everything Graph sends, which is often far more text. The host is fixed to this tenant's Graph endpoint and path must be relative, so an absolute URL is rejected. GET is always available; the write methods require --allow-generic-write. Pass maxPages to follow @odata.nextLink, and prefer $select and $top in query to keep the response small. The call authenticates with the minimal scope guessed from path, so a path whose scope is granted succeeds even when an unrelated scope is missing; pass scopes to override the guess.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Request body for a write method, as JSON. Ignored for GET. A string is sent as raw bytes (which is what Graph content endpoints expect); anything else is JSON-encoded. | |
| path | Yes | Graph-relative path beginning with "/", e.g. "/me/messages" or "/users/alice@contoso.com/drive/root/children". Never a full URL: the host is fixed and an absolute URL is rejected. A "?query" suffix is accepted and merged with the `query` argument, but passing options in `query` is clearer. | |
| query | No | Query string parameters, e.g. {"$select":"id,subject","$top":"10"}. Values are sent verbatim, so OData operators belong here rather than spliced into `path`. | |
| method | No | HTTP method. Defaults to GET. The write methods are refused unless the server was started with --allow-generic-write, and always under --read-only. | |
| scopes | No | Scopes to request a token for. Defaults to the minimal scope guessed from `path` (Mail.Read for a mail path, Chat.Read for a chat path, and so on), falling back to the union of every enabled group when the path matches nothing known. Pass an explicit list only when the endpoint needs a scope the guess does not cover. | |
| version | No | Graph endpoint. Defaults to the server default (v1.0). "beta" is refused unless the server was started with --beta; beta resources can change without notice. | |
| maxPages | No | How many pages of a collection to follow via @odata.nextLink, 1-5. Defaults to 1 (no paging). Pages are merged into a single value array. |