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
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###############'