SOQL Query for Users Modified Today
SOQL for users changed today, including LastModifiedBy, audit-field filters, and how to spot integration-driven updates.
Updated 2026-09-09
When something looks wrong in production, the first question is what changed. This query lists today's edits to users and who made them.
User queries are the fastest way to audit licences, dormant logins, and profile assignments without opening Setup.
The query
SELECT Id, Name, Username, LastModifiedDate, LastModifiedBy.Name
FROM User
WHERE LastModifiedDate = TODAY
ORDER BY LastModifiedDate DESC
LIMIT 200Narrow to a single user or integration
Integration users show up here in bulk. Filtering by the modifying user separates human edits from automated ones in seconds.
SELECT Id, Name, Username, LastModifiedDate
FROM User
WHERE LastModifiedDate = TODAY
AND LastModifiedBy.Name = 'Integration User'Created vs modified
SELECT Id, Name, Username, LastModifiedDate
FROM User
WHERE LastModifiedDate = TODAY AND CreatedDate != TODAYCreatedDate = TODAY- brand-new records only.LastModifiedDate = TODAY AND CreatedDate != TODAY- edits to existing records only.SystemModstampalso moves when the platform updates a record, so it is the widest net of the three.
Common mistakes to avoid
- Use the API name
User, not the UI label - the two differ on several standard objects. - Wrap literal text values in single quotes; date literals such as
LAST_N_DAYS:30must stay unquoted. - Run the query in a sandbox first if it feeds a bulk update - a
WHEREclause that is one character off can select the whole table. - Audit fields are read-only unless Set Audit Fields is enabled, so they cannot be corrected after a bad import.
SystemModstampchanges on platform-driven updates that leaveLastModifiedDatealone - use it when hunting integration activity.
Run it faster with TurboKit
Change investigations move between query results, field history, and login history - keeping those in one panel saves the tab juggling.
TurboKit's AI SOQL builder lets you describe the result you want in plain English, returns the query, and exports the rows to CSV or Excel in the same panel - without leaving the Salesforce tab you are already on.
Frequently asked questions
- What is the difference between LastModifiedDate and SystemModstamp?
LastModifiedDatereflects user and API edits.SystemModstampalso advances when the platform itself updates the row, so it is greater than or equal toLastModifiedDate.- How far back does the modification history go for users?
- The audit fields hold only the most recent change. For a change history you need Field History Tracking, which is queried from the object's history table.
- Can I see what changed, not just that it changed?
- Not from these fields. Query the
<Object>Historytable for tracked fields, or check Setup Audit Trail for configuration changes.
More from the SOQL Library
- SOQL Query for Accounts Modified TodaySOQL for accounts changed today, including LastModifiedBy, audit-field filters, and how to spot integration-driven updates.
- SOQL Query for Campaigns Modified TodaySOQL for campaigns changed today, including LastModifiedBy, audit-field filters, and how to spot integration-driven updates.
- SOQL Query for Cases Modified TodaySOQL for cases changed today, including LastModifiedBy, audit-field filters, and how to spot integration-driven updates.
- SOQL Query for Contacts Modified TodaySOQL for contacts changed today, including LastModifiedBy, audit-field filters, and how to spot integration-driven updates.
- SOQL Query for Leads Modified TodaySOQL for leads changed today, including LastModifiedBy, audit-field filters, and how to spot integration-driven updates.
- SOQL Query for Opportunities Modified TodaySOQL for opportunities changed today, including LastModifiedBy, audit-field filters, and how to spot integration-driven updates.
Related reading
- Admin How-ToHow to Check Field-Level Security in Salesforce FastCheck field-level security in Salesforce without clicking through Setup: where FLS lives, how it interacts with profiles and permission sets, and faster ways to read it.
- Admin How-ToHow to Compare Two Profiles in SalesforceCompare two Salesforce profiles field by field: the native Setup route, the permission types worth diffing, and how to keep the result auditable.
- Admin How-ToHow to Retrieve Salesforce Metadata Without the CLIRetrieve Salesforce metadata - objects, fields, layouts, profiles - using the Metadata API, the CLI, or an in-browser viewer, and when each is worth the setup.
- Admin How-ToHow to Write Salesforce Queries Without Knowing SOQL (AI SOQL)Describe the records you want in plain English and get a runnable SOQL query back - how AI SOQL builders work, what to check before you run the result, and where they still fall short.