---
schema_version: "1"
id: 3c3580952ced952d287197a7b3e2fdf4580059a724a02377d7cd4d13c6cdf04a
title: LoginGeo
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_logingeo.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_logingeo.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: caf261139e8b3e7a03bb273176f8f7f492400c7d13869d5891dfbd11daeaf7d8
description: Represents the geographic location of the user’s IP address for a login event. Due to the nature of geolocation technology, the accuracy of geolocation fields (for example, country, city, postal code) may vary. This object is available in API version 34.0 and later.
---
# LoginGeo

Represents the geographic location of the user’s IP address for a login event. Due to the nature of geolocation technology, the accuracy of geolocation fields (for example, country, city, postal code) may vary. This object is available in API version 34.0 and later.

## Supported Calls

describeSObjects(), query(), retrieve()

## Special Access Rules

Only users with Manage Users permissions can access this object.

## Fields

| Field | Details |
| --- | --- |
| City | 
Type

string

Properties

Filter, Group, Nillable, Sort

Description

The city where the user’s IP address is physically located. This value is not localized.



 |
| Country | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The country where the user’s IP address is physically located. This value is not localized.



 |
| CountryIso | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The ISO 3166 code for the country where the user’s IP address is physically located. For more information, see [Country Codes - ISO 3166](http://www.iso.org/iso/country_codes.htm)



 |
| Latitude | 

Type

double

Properties

Filter, Nillable, Sort

Description

The latitude where the user’s IP address is physically located.



 |
| LoginTime | 

Type

dateTime

Properties

Filter, Sort

Description

Time of the login attempt, in GMT time zone.



 |
| Longitude | 

Type

double

Properties

Filter, Nillable, Sort

Description

The longitude where the user’s IP address is physically located.



 |
| PostalCode | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The postal code where the user’s IP address is physically located. This value is not localized.



 |
| Subdivision | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The name of the subdivision where the user’s IP address is physically located. In the U.S., this value is usually the state name (for example, Pennsylvania). This value is not localized.



 |

## Usage

The API allows you to do many powerful queries. A few examples are:

| Sample Query | Query String |
| --- | --- |
| Query showing the country for a login event, where Id=LoginGeoId from AuthSession | SELECT Country FROM LoginGeo WHERE Id = '0LE###############' |
| Query showing the city and postal code for a login event, where Id=LoginGeoId from LoginHistory | SELECT City, PostalCode FROM LoginGeo WHERE Id = '0SO###############' |