I have a public facing LWC in a community that you do not need to login in to see. I'm trying to retrieve data based on a recordId. I'm getting an error saying I don't have access to that apex controller. Normally, I'd just add that controller to a permission set or profile, but since there is no login happening, how do I allow access to that controller for users just clicking on the link and not logging in?

1 Answer 1


You add that permission to the Guest User that represents the community. Go to Setup | User Interface | Sites and Domains | Sites | Site Name | Public Access Settings, then edit this profile to assign any resources public users should have access to.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .