Can I override the default query for the User or Group objects?


Answer:

When you include lookup fields that can reference User/Group (for example, OwnerId), SFDMU adds both objects with a Readonly operation. Insert/Update/Upsert are not supported for these objects.

By default, SFDMU reads common fields from both objects:

SELECT Id, Name, CreatedDate, LastModifiedDate, SystemModstamp FROM User
SELECT Id, Name, CreatedDate, LastModifiedDate, SystemModstamp FROM Group WHERE Type = 'Queue'

You can override the User filter by defining a dedicated User section in export.json:

{
    "query": "SELECT Id FROM User WHERE Name <> 'User Name'",
    "operation": "Readonly"
}

You can override the Group filter using the root-level groupQuery setting in export.json. It accepts either a full Group SOQL query or just a WHERE clause, for example:

{
    "groupQuery": "Type = 'Regular'"
}
{
    "groupQuery": "SELECT Id FROM Group WHERE Type = 'Organization' AND Description != null"
}

Note: The externalId field for both User and Group objects should always be the Name field. This is set by default and can be omitted.

Related Articles

Last updated on 17th Feb 2026