# Get All Presence

## Get presence information about all company (pod) users.

> The returned data is taken from the in-memory cache for performance\
> reasons which means inactive users may be omitted from the response.\
> \
> All non-inactive users WILL be returned and some inactive users MAY\
> be included. Any omitted user IS inactive.\
> \
> Returned records are sorted by user ID, ascending.\
> \
> This method is expensive. It pulls ALL records from the cache, sorts them and then only uses a subset.\
> For large numbers of users, this can be very inefficient both due to sorting\
> and due to the cache being distributed across many nodes.\
> \
> Addiionally, there is the potential to miss users if they become active\
> after the page in which their user ID falls has already been read by the client.\
> To avoid this situation, a presence feed should be created (and optionally read from)\
> first to capture presence changes of users who get reactivated during a paged call to this endpoint.<br>

```json
{"openapi":"3.1.1","info":{"title":"Pod API","version":"20.17.1"},"servers":[{"url":"http://yourpodURL.symphony.com/pod"}],"paths":{"/v2/users/presence":{"get":{"summary":"Get presence information about all company (pod) users.","description":"The returned data is taken from the in-memory cache for performance\nreasons which means inactive users may be omitted from the response.\n\nAll non-inactive users WILL be returned and some inactive users MAY\nbe included. Any omitted user IS inactive.\n\nReturned records are sorted by user ID, ascending.\n\nThis method is expensive. It pulls ALL records from the cache, sorts them and then only uses a subset.\nFor large numbers of users, this can be very inefficient both due to sorting\nand due to the cache being distributed across many nodes.\n\nAddiionally, there is the potential to miss users if they become active\nafter the page in which their user ID falls has already been read by the client.\nTo avoid this situation, a presence feed should be created (and optionally read from)\nfirst to capture presence changes of users who get reactivated during a paged call to this endpoint.\n","parameters":[{"schema":{"type":"string"},"name":"sessionToken","description":"Session authentication token.","in":"header","required":true},{"schema":{"type":"integer","format":"int64"},"name":"lastUserId","description":"Last user ID retrieved. Used for paging; if provided, results will skip users with IDs less than this parameter.","in":"query","required":false},{"schema":{"type":"integer"},"name":"limit","description":"Max number of records to return. If no value is provided, 1000 is the default. The maximum supported value is 5000.","in":"query","required":false}],"tags":["Presence"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2PresenceList"}}}},"400":{"description":"Client error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized: Invalid session token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden: Caller lacks necessary entitlement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"V2PresenceList":{"type":"array","items":{"$ref":"#/components/schemas/V2Presence"}},"V2Presence":{"allOf":[{"$ref":"#/components/schemas/V2UserPresence"},{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64","description":"The time, in milliseconds since Jan 1 1970, when the presence state was set."}}}]},"V2UserPresence":{"allOf":[{"$ref":"#/components/schemas/V2PresenceStatus"},{"type":"object","properties":{"userId":{"type":"integer","format":"int64","description":"The ID of the user to whom the presence state relates."}}}]},"V2PresenceStatus":{"type":"object","properties":{"category":{"type":"string","description":"Presence status. Possible values are:\n  - UNDEFINED\n  - AVAILABLE\n  - BUSY\n  - DO_NOT_DISTURB\n  - ON_THE_PHONE\n  - BE_RIGHT_BACK\n  - IN_A_MEETING\n  - AWAY\n  - OUT_OF_OFFICE\n  - OFF_WORK\n  - OFFLINE\n"}},"required":["category"]},"Error":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}
```

> 📘 All non-inactive users are returned and some inactive users may be included. Any omitted user is inactive.

> 🚧 Only users with the "User Provisioning" role can call this endpoint

When calling this as an [OBO-enabled endpoint](https://rest-api.symphony.com/main/apps-on-behalf-of-obo), use the [OBO User Authenticate](https://rest-api.symphony.com/main/apps-on-behalf-of-obo/obo-rsa-user-authentication-by-user-id) token for `sessionToken`.

For a list of the available presence statuses, please see the [Get Presence](https://rest-api.symphony.com/main/presence/get-presence)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rest-api.symphony.com/main/presence/get-all-presence.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
