Newer Version Available
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 | |
| Country | |
| CountryIso |
|
| Latitude | |
| LoginTime | |
| Longitude | |
| PostalCode | |
| Subdivision |
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###############' |