I was using Apex Sharing and it was working fine, but then I noticed that for some objects when I use CustomObject__Share it says 'Entity is not org-accessible'. I tried to google it, but wasn't able to find any info on why I can't access Apex Sharing Objects.
You can't share any objects where the
Org-Wide Sharing Default for it is
Public Read/Write. Similar to how you can't set the sharing default to that level if you already use
The organization-wide default settings can’t be changed from private to public for a custom object if Apex code uses the sharing entries associated with that object. For example, if Apex code retrieves the users and groups who have sharing access on a custom object Invoice__c (represented as Invoice__share in the code), you can’t change the object’s organization-wide sharing setting from private to public.