This article describes how to connect Salesforce with Okta using OpenID Connect.
- Salesforce
- OpenID Connect
- Okta Classic Engine
In order to successfully Single Sign-On to the Salesforce tenant using OpenID Connect, make sure that:
-
The Salesforce tenant has one of the following editions:
-
Enterprise
-
Performance
-
Unlimited
-
Developer
-
-
The Salesforce account has the following permissions:
-
To view the following settings:
-
View Setup and Configuration
-
-
To edit the following settings:
-
Customize Applications
-
Manage Auth. Providers
-
-
Once the requirements are confirmed, take the following steps to configure Okta as an OpenID Connect Identity Provider for Salesforce:
-
Log in to the Okta org and navigate to Admin.
-
If using the Developer Console interface:
-
Navigate to Applications > Add Application.
-
From the window opened, select Web as the platform for creating the application and click Next.
-
Configure the application settings as follows:
-
Name: Salesforce OpenID Connect SSO
-
Base URIs: remove the content by selecting X.
-
Sign-in redirect URIs:
http://placeholder -
Group assignments: leave Everyone if everyone should be able to access Salesforce or change it to the groups of people who will have access to Single Sign-On in Salesforce.
-
Grant type allowed: leave Authorization Code as this is the flow that Salesforce will use to get users authorized.
-
-
Click Done. There will be a redirect to the OpenID application configuration.
-
-
If using the Classic UI interface:
-
Navigate to Applications, Add Application, and then Create New App.
-
Select the following configuration:
-
Platform: Web.
-
Sign on method: OpenID Connect.
-
-
Configure the application settings as follows:
-
Name: Salesforce OpenID Connect SSO.
-
Application logo: leave empty.
-
Sign-in redirect URIs:
http://placeholder -
Sign-out redirect URIs: leave unconfigured.
-
-
Click Save. There will be a redirect to the OpenID application configuration.
-
Navigate to the Assignments tab and assign the users or groups of users that will have access to the application.
-
-
Under the General tab, scroll down to the Client Credentials and copy the Client ID and Client Secret.
-
Log in to the Salesforce tenant and access the administrator interface.
-
Navigate to Identity > Auth. Provider and select New.
-
In Provider Type, select Open ID Connect and fill the form as follows, replacing
<oktaorg>.okta.comwith the URL of the Okta organization (for example,<company>.okta.com,<company>.oktapreview.com,<company>.okta-emea.com):-
Name: Okta.
-
URL Suffix: Okta.
-
Consumer Key: paste here the Client ID copied earlier from Okta at step 4.
-
Consumer Secret: paste here the Client Secret copied earlier from Okta at step 4.
-
Authorize Endpoint URL:
https://<oktaorg>.okta.com/oauth2/v1/authorize -
Token Endpoint URL:
https://<oktaorg>.okta.com/oauth2/v1/token -
User Info Endpoint URL:
https://<oktaorg>.okta.com/oauth2/v1/userinfo -
Token Issuer: leave empty.
-
Default scopes: openid.
-
Send access token in header: checked.
-
Send client credentials in header: unchecked.
-
Custom Error URL: leave empty.
-
Custom Logout URL: leave empty.
-
Registration Handler: configure registration handler wanting users to be created just in time when they access Salesforce for the first time.
-
Execute Registration As: who should execute the registration.
-
Portal: none.
-
Icon URL: leave empty.
-
-
After finishing the configuration, click Save, and there will be a redirect to the Auth. Provider configuration in Salesforce.
-
From Salesforce Configuration, copy the Callback URL and OAuth-Only Initialization URL.
-
In the Okta Admin Console navigate to Applications > Applications > Salesforce OpenID Connect SSO.
-
Under General tab > General Settings > click Edit.
-
Paste the Callback URL copied at step 9 in Login redirect URIs section and click Save.
-
Log out from Salesforce and access the OAuth-Only Initialization URL copied at step 9.
Related References
- More details about configuring a Salesforce OpenID Connect Identity Provider can be found in the Configure an Authentication Provider Using OpenID Connect documentation.
