Microsoft Graph Tool
Check which Microsoft 365 / Entra tenant a Graph credential points at, and read the organisation's own record. This is the credential anchor for the whole msgraph-* family: it owns the shared credential type, and it answers the first question anyone asks of a new credential — did this connect, and to which tenant?
Tool ID
msgraph
Credential Required
Yes — one msgraph credential, shared by every msgraph-* connector. Configure the tenant
once and all nine tools use it; rotating the client secret is one edit rather than nine.
It is a server-managed OAuth credential: InTouch mints and refreshes the access token itself and
the connector never sees the secret. For unattended work set grant_type to client_credentials
(the app-only grant) — an app-only token belongs to the application, so a 06:00 schedule does not
run as a person, see only what that person can see, and stop working the day they leave.
Credential Properties
| Property | Type | Default | Description |
|---|---|---|---|
client_id |
string | — | Required. The Entra app registration's Application (client) ID. |
client_secret |
string | — | Required for app-only. The secret's Value, not its Secret ID. |
token_url |
string | — | Required. https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token |
grant_type |
string | (blank) | client_credentials for unattended app-only use. Blank means the user-delegated refresh-token flow. |
scope |
string | — | https://graph.microsoft.com/.default — resolves to whatever application permissions an admin has consented to. |
access_token |
string | — | Machine-managed. Leave empty; the server mints and persists it. |
refresh_token |
string | — | Delegated credentials only. Not used by the app-only grant. |
expires_at |
string | 0 |
Machine-managed expiry, epoch seconds. |
Entra setup
- https://entra.microsoft.com → App registrations → your app → API permissions.
- Add a permission → Microsoft Graph → Application permissions — not Delegated. Picking Delegated is the most common failure: it consents cleanly and then 403s at runtime.
- Tick the permissions listed under Permissions below, then Grant admin consent. The Status column must read Granted.
- Permissions live in the token, not the portal. A token minted before the grant carries the old
claims for about an hour — blank
access_tokento force a fresh mint.
Permissions
Directory.Read.All (or Organization.Read.All).
Operations
1. get_organization — Get the tenant
The tenant's own record — display name, id, verified domains, country. Works on both grants, which is why it is the credential test. Calls GET /organization.
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
operation |
string | — | Required. get_organization |
query |
string | — | Optional. OData query params as a JSON object string, e.g. {"$select": "displayName,id"}. |
Published Outputs:
- result — the JSON response body
- status — HTTP status code
2. list_domains — List verified domains
The tenant's verified domains. The fastest human check that a token points at the right tenant. Calls GET /domains.
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
operation |
string | — | Required. list_domains |
query |
string | — | Optional. OData query params as a JSON object string, e.g. {"$select": "displayName,id"}. |
Published Outputs:
- result — the JSON response body
- status — HTTP status code
3. whoami — Get the signed-in user
The signed-in user. Delegated credentials only — returns HTTP 400 on an app-only token. Calls GET /me.
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
operation |
string | — | Required. whoami |
query |
string | — | Optional. OData query params as a JSON object string, e.g. {"$select": "displayName,id"}. |
Published Outputs:
- result — the JSON response body
- status — HTTP status code
Paging
Graph answers a collection with 100 rows and an @odata.nextLink, so a naive listing returns a
fraction of a large tenant with HTTP 200 and no sign anything is missing. This connector follows
the continuation link until the collection is exhausted. If it stops at the page cap it says so —
the result carries complete: false with a warning, and the step returns WARNING rather than
SUCCESS. A page cap must never look like the end of the data.
Notes
whoami calls /me, which needs a user. An app-only credential has no user, and Graph
correctly answers HTTP 400. That is the expected result on an app-only credential, not a
fault — it is kept because it is the one call that proves a delegated credential is bound to the
person you expect.
Self-Contained JAR
The jar bundles all runtime dependencies; only intouch-tool-api is provided by the server.
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
completeoperationresultstatuswarning