System administrator or Users who have the permission to deactivate a User is receiving an error, 'This user is the default owner of records created by guest users and can’t be deactivated' when deactivating a User.
This error implies that the User is being used as the default owner of records created by guest users in an Experience or Force.com Site.
In order to resolve this, you must select another user as a default owner of records created by a guest user in a community.
To identify which site holds the user reference run the following query via the Developer Console Query Editor: Substitute <UserIdHere> with the Id of the user you are attempting to deactivate.
Select Id, Name from Site WHERE GuestRecordDefaultOwnerId = '<UserIdHere>'
Navigate to the Preferences menu of the Experience Cloud site
In Salesforce Classic: Setup | Customize | Digital Experiences | All Sites | Workspaces or Manage
In Lightning Experience: Setup | Feature Settings | Digital Experiences | All Sites | Workspaces or Manage
Click Administration tile.
Click Preferences.
Under 'Record Ownership' section, change the default owner to another User.
Click Save.
You can navigate to the Force.com Site within Setup.
Go to Setup
On the Quick Find Box, enter Sites
Under Sites and Domains, select Sites
Click the Site Name
Click Edit
Change the Default Record Owner
Click Save.
You should now be able to continue deactivating the user without any error.
If you find that some Experience Sites shown in Setup > All Sites do not have links to Workspaces or Builder, this would indicate that you are not a member of the site. Site membership (along with the necessary Experience Administrative permissions ) is required to access Workspaces. You will need to add yourself as a member of the site. Either contact an administrator that is a member to add your profile or add yourself as a member using the API. Please refer to the following documentation instructing you on how to do this:
How do I update Experience Cloud site membership using the API?
Note: If the issue still occurs after following the steps, please log a Support Case for further assistance.
See Also:
000381030

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.