3

I'm trying to use the External Services feature to call a REST-based SMS API for the two-factor authentication of our Community users. (Basically recreating this scenario, but with an External Service instead of the Apex callout: https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/security_3p_sms_2fa_login_flow.htm).

For this I have defined the OpenApi schema of the service, created the named credential, the service and the flow. And everything is working fine, when I debug the flow as an administrator.

But, when I set it up as a login flow for Community users, I get the error:

Error Occurred During Flow "SMSTwoFactorAuth": Action name not found: (...)__Service

The action name is the auto-generated Apex action for the External Service I can see in the Flow editor.

Is there any limitation of the External Services, that they cannot be used by Community users? This auto-generated class does not appear in the regular classes list, so I can't e.g. add it to the list of class permissions for the community profile.

3

1 Answer 1

0

Things might vary depending on whether you are using a real Login Flow, or a normal Flow on a Login page. When you are running a Login Flow, then you are not yet authenticated. So the user is, in fact, the Community's Guest User.

You need to give the following rights :

  • Community Site : checking "Guest Access to the Support API" might be useful
  • Guest User profile : "Run Flows" if it's a normal Flow
  • Guest User profile : add your Flow to "Flow access" it it's a normal Flow
  • Guest User profile : add named credential used in External Service to "Named Credential Access"
  • if by any chance you had Apex classes (eg SF controllers in some Lightning Components in your Flow), you should also add them to your Guest User profile
  • in a Login Flow, you might need to check "Render Flow in Lightning Runtime"

I hope this helps.

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.