Some Salesforce orgs that use Einstein Activity Capture (EAC) or Lightning Sync to sync calendar events experienced an issue where guest users in Experience Cloud (Digital Experience) sites could gain ownership of synced events. If the org's access control permissions were misconfigured, guest users could potentially view this specific event data.
Einstein Activity Capture (EAC) is a Salesforce feature that automatically syncs email and calendar events between Salesforce and external email applications (such as Microsoft Exchange or Google). Lightning Sync is the predecessor service that provided similar calendar and contact synchronization functionality.
Salesforce has taken measures to remediate this exposure. However, if your Salesforce org was created before the Summer '21 release, you must manually follow the steps in this article to remove guest user access to events and prevent future access.
This article covers:
Before making any data changes, you must find the Salesforce record IDs of all Guest Users configured in your Experience Cloud sites. You will use these IDs in the queries that follow.
To prevent unauthenticated guest users from accessing events, disable the Access Activities permission on the Guest User profile.
For detailed instructions, see the Access Activities Permission documentation and Securing Guest User Access in Experience Cloud Sites.
If a guest user owns a standalone (non-recurring, non-child) calendar event, you must delete or reassign that event.
Use Data Loader or Workbench to query the Event object and filter by the OwnerId field. The OwnerId should match the Guest User record ID obtained in Step 1.
Run the following query for each guest user (replace [GuestUserRecordId] with the actual ID):
SOQL Query: SELECT Id FROM Event WHERE OwnerId = '[GuestUserRecordId]' AND IsChild = false
If the query returns records, those events are owned by the guest user. You can delete the returned records or update the OwnerId field to a non-guest user. If you have more than one guest user, run this query for each guest user ID.
If a guest user appears as an invitee on a non-recurring calendar event or a past recurring calendar event, remove them from the event.
Use Data Loader or Workbench to query the EventRelation object, which stores event invitee relationships. Filter by the RelationId field using the Guest User record ID.
Run the following query for each guest user (replace [GuestUserRecordId] with the actual ID):
SOQL Query: SELECT Id FROM EventRelation WHERE RelationId = '[GuestUserRecordId]' AND (Event.IsRecurrence2 = false OR Event.StartDateTime < TOMORROW) AND Event.IsRecurrence2Exception = false
To remove single event invitations for guest users, either remove them directly from the organizer's event record in the Salesforce UI, or delete the EventRelation records returned by this query using the EventRelation API reference.
For recurring event series and recurring exceptions in Lightning Experience, use the Salesforce UI to remove the guest user from each series, or use the API to update the invitee fields on the Event object.
The invitee fields on the Event object (in Lightning Experience) are:
Option A — Find and edit via the UI:
Run the following query to identify recurring events that reference the guest user (replace [GuestUserRecordId] with the actual ID):
SOQL Query: SELECT Event.Id, Event.Subject, Event.AcceptedEventInviteeIds, Event.DeclinedEventInviteeIds, Event.UndecidedEventInviteeIds FROM EventRelation WHERE RelationId = '[GuestUserRecordId]' AND Event.IsRecurrence2 = true AND (Event.StartDateTime >= TODAY OR Event.IsRecurrence2Exception = true)
Use the returned Event.Id values to navigate to each event record in Salesforce and manually remove the Guest User from the Invitees list.
Option B — Remove via the API (JunctionIdList):
Use the JunctionIdList fields (AcceptedEventInviteeIds, DeclinedEventInviteeIds, or UndecidedEventInviteeIds) on the Event object to remove the Guest User. For example, if Event.AcceptedEventInviteeIds originally contains ['StandardUserRecordId', 'GuestUserRecordId'], update it to ['StandardUserRecordId'] to remove the guest user.
After completing the steps above, review the Guest User Profile Best Practices and Considerations to prevent guest users from gaining access to event data in the future.
If you encounter problems with any of the steps above, log a Salesforce Support Case with #GuestRem21 in the subject line.
000389512

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.