# Session timeouts

{% hint style="info" %}
Note that today the Spark website has a `4 h` idle timeout that operates in addition to the Keycloak session settings. This will be removed in a future release.

Coherent Assistant does not have this configuration and uses the Keycloak session settings directly.
{% endhint %}

## Update session settings for tenant

1. Login to the target Spark tenant. Access the *Keycloak console* from the [Navigation menu](/navigation/navigation-menu.md#user-menu).
2. Login in the Keycloak Admin Console using your admin credentials.
3. Click *Realm settings* on the left sidebar.
4. Click the *Sessions* tab.
5. *SSO Session Idle* and *SSO Session Max* control the session settings for the entire tenant. These settings apply universally and act as a cap on top of any client specific configurations.
6. Update these values in alignment with your organization preferences and/or requirements.
7. Click **Save**.

## Update session settings per client

Relevant clients relate to applications of note include:

* `academy` for [Coherent Academy](https://coherentacademy.coherent.global/).
* `insights`  for [Coherent Insights](https://www.coherent.global/platform/insights).
* `product-factory` that includes [Coherent Spark](/readme.md) and [Coherent Assistant](https://marketplace.microsoft.com/en-us/product/office/wa200006757).

The following steps are only required if it is necessary to modify the session settings per Coherent application.&#x20;

1. Login to the target Spark tenant. Access the *Keycloak console* from the [Navigation menu](/navigation/navigation-menu.md#user-menu).
2. Login in the Keycloak Admin Console using your admin credentials.
3. Click *Realm settings* on the left sidebar.
4. Click the *Sessions* tab.
5. *Client Session Idle* and *Client Session Max* control the default session settings per application.
6. If necessary, the default can be changed that differs from the *SSO Session* settings.
7. Click **Save**.
8. Now click *Clients* in the sidebar.
9. Select the application of interest, e.g. `product-factory`.
10. Click the *Advanced* tab.
11. Under *Advanced settings*, *Client Session Idle* and *Client Session Max* should contain *Inherits realm settings*. These are the settings defined in the *Realm settings Client Session Idle* and *Client Session Max*.
12. If necessary, the settings for the *Client Session Idle* and *Client Session Max* can be changed for the selected application.
13. Click **Save**.


---

# 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://docs.coherent.global/identity-and-access-management/session-timeouts.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.
