How to use SkyVisualEditor with multi-factor authentication enabled orgs
Updated: Jun 13
As of February 1st (2022), multi-factor authentication (MFA) has been required to access all Salesforce products. If you have yet to fully dive into setting up MFA or have questions about MFA in general, here is a Salesforce link to get started.
There are two ways that the MFA can be utilized - the traditional login method and for API logins. Since SkyVisualEditor connects to Salesforce via the API, we will focus on this particular aspect and help new users get up and running quickly.
What is Multi-Factor Authentication for API Logins?
MFA for API Logins is a pretty straightforward feature once you understand what MFA is to begin with. MFA for API Logins applies the MFA standards to all API login attempts, so this will effect many back-end data integrations or apps that talk to Salesforce using the API whereas the normal MFA affects end users who are logging into the normal Salesforce UI.
For those who haven't really used MFA before, let me quickly break down what it is and then we can show how to gain access to Salesforce with this feature enabled. When you are logging into Salesforce using your Username+Password, this is one factor of authenticating who you are. When you have Multi-Factor Authentication enabled this means you'll have a secondary method (factor) of authentication that will verify who you are in addition to your Username & Password. This significantly increases security for your organization, so it isn't a surprise to see that Salesforce has made this requirement as of Feb. 1st.
Moving forward, I will assume you already have MFA established and now you're just trying to figure out how to use SkyVisualEditor with this feature turned on.
Connect SkyVisualEditor to a Salesforce org with MFA for API Logins enabled
When you log into the SkyVisualEditor, both the Visualforce and the Lightning Component design studio, you will be prompted with a screen requesting that you enter your Salesforce credentials.
This is to connect to one of your Salesforce orgs using the API. The typical method of doing this is by using your Username & Password+Security Token. If you have the SkyVisualEditor IP address White Listed then it will simply be your Username & Password. If you have MFA for API Logins enabled you will be presented with the following error message:
To get through this error we need to utilize the MFA verification code that you have for this login attempt. I use the Salesforce Authenticator app, however there are several methods that can be used with MFA. Once you have your verification code, you will need to append the code to the end of your password.
Example Salesforce Password: T3$tp@ssw0rd
Verification Code: 885 551
Password you will now input into SkyVisualEditor's login request: T3$tp@ssw0rd885551
If you don't have the SkyVisualEditor IP address white listed then you will structure the password as follows: Password+SecurityToken+VerificationCode.
MFA is a great addition to the Salesforce platform, but it does cause some initial hiccups as people adapt to a new way of doing things. We desire to help our customers and prospective customers use the SkyVisualEditor platform hassle free and any kind of error that is encountered isn't a great feeling. I hope you have found this to be helpful in bypassing this error. We look forward to your continued support of SkyVisualEditor