2

We're using the JWT flow to retrieve session IDs for the current user in a Lightning Community, for use in code running outside of Salesforce. In particular, we use that session ID to run SOSL queries on behalf of the current user.

It works very well when a user is logged in, but when accessing the community in Guest mode Salesforce seems to use some kind of "virtual" user that is a member of a particular profile. For this user the JWT flow doesn't work, even though we "pre-approved" the Connected App for this profile, as we did for the others.

Another option for us is to provide explicit configuration options to designate a real user that will be used for "guest" users, but this makes the setup steps more complex...

Does anybody knows of a way to use that flow to get a Session ID that would provide the same access as the "guest" user?

2

Well it turns out this doesn't work because the profile that gets used for Guest user (and that is, as far as I know, not configurable) uses the Guest license, which disables any kind of API access.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.