---
title: Device Geofencing node
description: The Device Geofencing node compares any collected device location metadata with the configured trusted locations.
component: auth-node-ref
version: latest
page_id: auth-node-ref::device-geofencing
canonical_url: https://docs.pingidentity.com/auth-node-ref/latest/device-geofencing.html
keywords: ["Nodes &amp; Trees", "Journeys", "Authentication"]
page_aliases: ["auth-node-device-geofencing.adoc"]
superseded_by: https://docs.pingidentity.com/auth-node-ref/latest/device-geofencing.html
section_ids:
  example: Example
  availability: Availability
  inputs: Inputs
  dependencies: Dependencies
  configuration: Configuration
  outputs: Outputs
  callbacks: Callbacks
  outcomes: Outcomes
  errors: Errors
---

# Device Geofencing node

The Device Geofencing node compares any collected device location metadata with the configured trusted locations.

Use this node with the [Device Profile Collector node](device-profile-collector.html) to determine if the authenticating user's device is located within range of configured, trusted locations.

## Example

The following journey checks whether the user's device is located within ten kilometers of their company's office locations. If the device's location is within this range from one of the offices, the journey proceeds and prompts the user to authenticate. If the device's location is outside this range from all of the offices, authentication fails:

![Checking whether the current device is located within range of the trusted locations before authenticating](_images/device-profile-journey-geo.png)

* The [Device Profile Collector node](device-profile-collector.html) collects metadata about the current device, including the device's location.

* The [Device Geofencing node](device-geofencing.html) compares the current device's location with the specified trusted locations. In this example, the trusted locations are the company's offices.

- The [Page node](page.html) containing the [Platform Username node](platform-username.html) and [Platform Password node](platform-password.html) prompts for credentials.

- The [Data Store Decision node](data-store-decision.html) validates the username-password credentials.

- The [Increment Login Count node](increment-login-count.html) updates the login count on successful authentication.

## Availability

| Product                               | Available? |
| ------------------------------------- | ---------- |
| PingOne Advanced Identity Cloud       | Yes        |
| PingAM (self-managed)                 | Yes        |
| Ping Identity Platform (self-managed) | Yes        |

## Inputs

This node reads the collected device metadata from the shared state.

Implement a [Device Profile Collector node](device-profile-collector.html) earlier in the journey to collect metadata for the current device.

## Dependencies

The [Device Profile Collector node](device-profile-collector.html) earlier in the journey must collect the device's location.

## Configuration

| Property                       | Usage                                                                                                                                   |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| Trusted Locations *(required)* | The latitude and longitude of at least one trusted location. Separate the values with a comma. For example, `37.7910855,-122.3951663`.  |
| Geofence Radius (km)           | The maximum distance, in kilometers, that a device can be from a configured trusted location.The distance is calculated point-to-point. |

## Outputs

This node doesn't change the shared state.

## Callbacks

This node doesn't send any callbacks.

## Outcomes

* `Inside`

  The collected location is within the specified range of a configured trusted location.

* `Outside`

  The collected location is outside the specified range of all the configured trusted locations.

## Errors

This node doesn't log any error or warning messages of its own.
