> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/sonar/administration/user-activity/geolocation.md). Agents can also search and read this documentation through its [MCP server](https://wiki.datadike.com/~gitbook/mcp).

# Geolocation

Where Windows devices have been: the last reported position and the location history on a map, with accuracy and the users signed in at the time.

## What this is and when to use it

Geolocation shows the physical position that Windows devices report, on a map and as a history. Use it to find where a laptop was last seen, to check that a device stays at the office it belongs to, or to see who was signed in on a device when it was at a given place.

The position is available in two places:

* **Observability › Geolocation**, to browse devices site by site.
* The **LOCATION** tab of a device, in the device panel of **Dashboard › Sysadmin**, for the device you have selected.

## What is collected

| Item     | Detail                                                                                                                |
| -------- | --------------------------------------------------------------------------------------------------------------------- |
| Devices  | **Windows** devices whose agent was installed with the **Geolocation** option                                         |
| Data     | Latitude, longitude and accuracy, as reported by the Windows location service                                         |
| Accuracy | The radius of uncertainty, in whole metres                                                                            |
| When     | When the agent is installed, each time the agent service starts, and then about once an hour (every 50 to 60 minutes) |

The **Geolocation** option is chosen when the installer is generated. It is on by default in **Agents › Install Agent** and off by default in a new deployment link. The option is part of the installation: to change it on a device, reinstall the agent with the option you want. See [Install the agent on Windows](https://wiki.datadike.com/sonar/deploy-operate/install-agent-windows.md).

The address shown next to each position is resolved from the coordinates by your browser when the list loads. The map and the addresses need the browser to reach the internet.

## Before you start

* A role with **View Geolocation** (group **Productivity** in **Admin Center › Roles**). It shows the **Geolocation** menu entry and opens the **LOCATION** tab.
* **List Sites** (group **Clients & Sites**), to fill the **Site** list.
* At least one Windows device installed with the **Geolocation** option that has reported a position.

## Steps

### Browse devices on the map

1. Open **Observability › Geolocation**.
2. In **Site**, choose the site. Only sites with at least one reported position are listed; the first one is selected for you.
3. In **Device**, choose the device. Devices are listed online first, then overdue, then offline, each with its status. The first one is selected for you.
4. Without a time window, the map shows the last position the device reported. To see a history, click **24H**, **7D**, **14D** or **30D** under **Time window**, or the calendar button for a custom range.
5. Under **Location History**, expand a day and click a position to show it on the map.

### Look at one device

1. Open **Dashboard › Sysadmin** and select the device.
2. Open the **LOCATION** tab.
3. Under **Time Window**, choose **1h**, **3h**, **12h**, **24h**, **7D** or **30D**. The default is **24h**. For a custom range, click the calendar button, set **Start** and **End**, and click **Apply**.
4. Click a position in **Location History** to show it on the map.

## What you should see

**Location History** groups the positions by day, newest first, with the number of positions on each day. Each entry shows when the position was recorded and its address. The most recent one carries the **LAST** badge, "Last location reported by agent". The colour of an entry reflects its accuracy:

| Colour | Accuracy        |
| ------ | --------------- |
| Green  | 100 m or better |
| Yellow | 101 to 499 m    |
| Red    | 500 m or more   |

The map shows one marker, on the selected position. Its information window shows the device hostname and status, when the position was collected, **Accuracy:&#x20;*****n*****&#x20;m**, the address, and the users who had a session open on the device within five minutes of that moment ("No connected users" when there were none).

## How to verify it worked

1. Open the **LOCATION** tab of a device installed with the **Geolocation** option, with **24h**.
2. At least one position must be listed. An online device adds one about every hour.
3. Restart the agent service on the device, or wait for the next hour. A new entry must appear at the top of **Location History** with the **LAST** badge.

## Common errors

| Symptom                                                                                     | Cause                                                                                                 | Fix                                                                                  |
| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| "No sites available"                                                                        | No device on any site has reported a position                                                         | Check that the devices were installed with the **Geolocation** option and are online |
| A device is missing from **Device**                                                         | The device has not reported a position, or it is not a Windows device                                 | Reinstall the agent with **Geolocation** on; only Windows devices report a position  |
| "No location data. Live or historical." or "No location data available for this time range" | No position in the chosen window                                                                      | Widen the time window                                                                |
| "You don't have permission for this action" on the **LOCATION** tab                         | The role lacks **View Geolocation**                                                                   | Add the permission to the role                                                       |
| "Address unavailable" or "Address lookup limit reached"                                     | The address could not be resolved, or the list has more positions than the addresses looked up for it | The coordinates are still correct; narrow the time window to see the addresses       |
| Only one position on the map                                                                | No time window is selected, so only the last position is shown                                        | Choose a time window                                                                 |

## Field reference

| Field           | Where        | What it does                          | Accepted values                                                           | Default                  |
| --------------- | ------------ | ------------------------------------- | ------------------------------------------------------------------------- | ------------------------ |
| **Site**        | Geolocation  | Limits **Device** to that site        | Sites with reported positions                                             | First site               |
| **Device**      | Geolocation  | Device whose positions are shown      | Devices of the site with positions                                        | First device             |
| **Time window** | Geolocation  | Period of the history                 | **24H**, **7D**, **14D**, **30D**, or a custom range                      | None: last position only |
| **Time Window** | LOCATION tab | Period of the history                 | **1h**, **3h**, **12h**, **24h**, **7D**, **30D**, or **Start** / **End** | **24h**                  |
| **Accuracy**    | Map          | Radius of uncertainty of the position | Metres                                                                    | —                        |

## Related pages

* [Device details](https://wiki.datadike.com/sonar/administration/devices/device-details.md) — the device panel and its tabs
* [Install the agent on Windows](https://wiki.datadike.com/sonar/deploy-operate/install-agent-windows.md) — the **Geolocation** option
* [Users Behavior](https://wiki.datadike.com/sonar/administration/user-activity/users-behavior.md) — **Latest location** in the user report
* [Roles and permissions](https://wiki.datadike.com/sonar/administration/identities/roles.md)
