Specify which objects Experience Cloud guest users and authenticated community or portal users can query through Omnistudio, so that external users reach only the data that your site needs.
Omnistudio components such as Flexcards, Vlocity Cards, custom Lightning components, and
Industries cloud features run SOQL queries and SOSL searches through the Omnistudio
HandleData() and HandleDataCards() methods. When an external
user runs one of these queries, Omnistudio checks every object that the query references against
the OmniStudioGuestAllowedObjects allowlist. If any object isn't on the
allowlist, the query returns no data.
Enforcement is on by default. Until you add objects to the allowlist, external users can't query any object through these methods, so components on your Experience Cloud sites show no records. Internal users aren't affected. Data Mappers, Integration Procedures, Apex Remote actions, and REST data sources aren't affected.
Allowed queries run in user mode. The external user's object permissions, field-level security, and sharing rules apply, so a guest user sees only what the guest user profile allows.
These security and code objects are always blocked for external users, even if you add them to the allowlist:
ApexClassApexTriggerApexPageApexComponentAuthProviderConnectedApplicationCertificateNamedCredentialPermissionSetPermissionSetAssignmentProfileSetupEntityAccess
Allowlist Entry Rules
-
Use the object API name, not the label. For example, enter Product2, not Product.
-
For custom objects, include __c. For objects in a managed package, also include the namespace prefix, for example, vlocity_ins__InsurancePolicy__c.
-
Separate objects with commas. Entries aren't case-sensitive, and spaces around commas are ignored.
-
Wildcards aren't supported. Enter each object by name.
-
Include every object that the query references: the object in the FROM clause, objects reached through relationship fields such as Owner.Name (User), objects in child subqueries, and every object in a SOSL RETURNING clause.
-
The allowlist applies to the whole org, including every component on every Experience Cloud site.
Add the Allowlist in Orgs with an Omnistudio License That Use the Standard Data Model
- From Setup, in the Quick Find box, enter Omni Interaction Configuration, and then select Omni Interaction Configuration.
-
If EnforceCardDatasourceSecurity is listed, make sure its value is set
to true. If the setting isn't listed, enforcement is on.
Don't turn off EnforceCardDatasourceSecurity. Turning off enforcement makes setup objects accessible to external users.
- If EnforceCardDatasourceSecurity is not listed in the Omni Interaction Configuration page, click New Omni Interaction Configuration.
- In the Label field, enter EnforceCardDatasourceSecurity.
- In the Value field, enter true.
- Save your changes.
- Click New.
- In the Label and Name fields, enter OmniStudioGuestAllowedObjects.
- In the Value field, enter the API names of the objects that your site components query, separated by commas. For example, to let external users query accounts, contacts, and cases, enter Account,Contact,Case.
- Save your changes.
Add the Allowlist in Orgs Without an Omnistudio License or Orgs That Use the Custom Data Model
- From Setup, in the Quick Find box, enter Custom Settings, and then select Custom Settings.
- Click G and find General Settings.
-
If EnforceCardDatasourceSecurity is listed, make sure its value is set
to true. If the setting isn't listed, enforcement is on.
Don't turn off EnforceCardDatasourceSecurity. Turning off enforcement makes setup objects accessible to external users.
- If EnforceCardDatasourceSecurity is not present in the General Settings page, click Manage and then click New.
- In the Name field, enter EnforceCardDatasourceSecurity.
- In the Value field, enter true.
- Save your changes.
- Click New.
- In the Name field, enter OmniStudioGuestAllowedObjects.
- In the Value field, enter the API names of the objects that your site components query, separated by commas. For example, enter Account,Contact,Case.
- Save your changes.
Give External Users Access to the Allowed Objects and Fields
Allowed queries run in user mode, so update the guest user profile and your community user profiles or permission sets. To find the guest user profile, in Experience Builder, go to Settings > General.
- Grant Read access to each object on the allowlist.
- Grant field-level Read access to every field that the query selects or filters on. If the user can't see a field, the whole query can fail.
- Make sure that sharing settings, guest user sharing rules, or sharing sets give the user access to the records.
Test as an External User
- To test as a guest user, open the site in a private or incognito browser window.
- To test as an authenticated user, log in as a test community user.
- Confirm that each component shows the expected data.
External users can now query the allowed objects through the HandleData() and HandleDataCards() methods, within the limits of their object permissions, field-level security, and sharing access.
Troubleshooting
| Problem | Potential Cause | Resolution |
|---|---|---|
| A component shows no records for external users but works for admins | The object isn't on the allowlist, or the allowlist setting is missing | Add every object that the query references to OmniStudioGuestAllowedObjects. |
| A component is still empty after you add the main object | A related object, such as User through Owner, or an object in a child subquery isn't on the allowlist | Check every relationship field and every inner SELECT, and add those objects. |
| An error about field or object access | The query passed the allowlist check, but user mode blocked it | Grant object Read access and field-level Read access to the guest or community profile. |
| Fewer records than expected | Sharing rules now apply to the user | Review guest user sharing rules or community sharing sets. |
| A search or lookup shows an error | The SOSL search has no RETURNING clause, or a RETURNING object isn't on the allowlist | Add a RETURNING clause, and add each RETURNING object to the allowlist. |
| Entries don't take effect | An object label was used instead of the API name, or the namespace or __c is missing | Use exact API names, for example, vlocity_ins__InsurancePolicy__c. |