Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
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###############' |