function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Yogesh Malbhage 18Yogesh Malbhage 18 

Guest user not able to access ContentVersion records through SOQL

We have uploaded a file in SF Files. The associated ContentVersion record is not returned on querying by a guest user with user license "Guest User". But it returns a row if internal SF user queries for the same. Can you please suggest a solution for the same?
Khan AnasKhan Anas (Salesforce Developers) 
Hi Yogesh,

Greetings to you!

It is an Idea (https://success.salesforce.com/ideaView?id=0873A000000cOZcQAM) to give access to Site Guest User to access content. You can also upvote this idea so that we can get this in the future.

However, please refer to the below link which might help you further with the above requirement.

https://developer.salesforce.com/forums/?id=9060G0000005kijQAA

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas