Skip to content
gist.link ↗

presence

Query Teams API — POST https://teams.api.gist.link/graphql

Presence for up to 100 org users: online = heartbeat seen within the freshness window (~2.5 min). Org-scoped; any authenticated member.

teams:query:presence

The calling IAM key must hold this permission (or a wildcard that covers it: teams:query:* or teams:*) and the access token must have been minted with audience=teams. See Permissions.

type Query {
presence(userIds: [String!]!): [PresenceEntry!]!
}
Argument Type Required Description
userIds [String!]! Yes —

[PresenceEntry!]! — see the Teams types reference.

Terminal window
curl https://teams.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query Presence($userIds: [String!]!) { presence(userIds: $userIds) { user_id online last_seen_at } }",
"variables": {
"userIds": [
"example"
]
}
}
JSON