Configure single sign-on
This topic describes how to configure Salesforce as an identity provider for single sign-on to AppDirect.
Prerequisites
- AppDirect must enable identifier-first user login in the marketplace.
- You must have a Company Administrator user setup and verified access to the marketplace to prevent being locked out.
SSO is not enforced for company administrators. This is a preventative measure to ensure that everyone is not locked out of the organization in the event that SSO is misconfigured or broken. Company administrators must log in using their AppDirect credentials. - Administrators must create Sales Support users for each sales agent in AppDirect and Salesforce organization. Add the AppDirect user permission set to these users.
- Salesforce administrators must manually set the User.AppDirect_Username field to match the username in AppDirect.
Note AppDirect usernames are case sensitive and the Salesforce email fields are not. You need a custom field to store the exact username from the AppDirect system to use in the SSO process.
Create the Salesforce identity provider
- In Salesforce, click the gear icon and then select Setup.
- Go to Settings > Identity > Identity Provider > Enable Identity Provider.
- Click Create new certificate.
- Add the following values to the fields:
Field Value Label AppDirect SSO Unique Name AppDirect_SSO Type Self-signed Key Size 2048 Exportable Private Key True - Click Save. The Salesforce organization is enabled as an IdP and generates a self-signed certificate.
- Click Download Certificate and then save it somewhere secure. You will need the certificate to upload to AppDirect.
To configure AppDirect single sign-on
- In AppDirect, go to Manage > Account > Company Settings > Company Settings | Single Sign-on.
- Add the following values to the fields:
Field Value Entity ID Issued from Salesforce identity provider created in prerequisites. Login URL The value is created when you create the connect app in the next step. For now, add the following place holder: https:// login.saleforce.com.Verification Certificate Upload the self-signed certificate that was generated when you created the Salesforce identity provider in the previous step. Service provider-initiated request binding HTTP Redirect NameID policy (format) Persistent Sign authentication request Disabled Automatic user creation Disabled User account linking by email Enabled Force re-authentication on session expiration Enabled Force SSO for end users Enabled
Note: To avoid getting locked out of the marketplace, ensure that you have set up a Company Administration user and have verified that you can log in as that user.Update user roles Disabled - Click Save.
- Note the Entity ID and the ACS URLs that were generated under SSO Config > Service Provider Configuration. These values will be added to the Salesforce connected app in the next step.
Configure custom attribute mapping
- In AppDirect, go to Manage > Account > Company Settings > Company Settings | Single Sign-on.
- Click Add Attribute Mapping. The Single Sign-on configuration page opens.
- For the Email Attribute Key, add email as the attribute value.
- Click Save. This explicitly calls out the value in the SAML assertion that Salesforce matches to the AppDirect user email address.
Create a new connected app in Salesforce
- In Salesforce, click the gear icon and then select Setup.
- Go to Platform Tools > Apps > App Manager.
- Click New Connect App. The New Connected App page appears.
- Add the following values to the New Connected App dialog:
Field Value Connected App Name AppDirect Single Sign On API Name AppDirect_Single_Sign_On Contact Email Salesforce admin user or support department email. Contact Phone Salesforce admin user or support department phone number. Description Authentication Setup for AppDirect Single Sign On. Web App Settings Start URL N/A Enable SAML true Entity ID Entity ID (issuer) URL listed in the AppDirect SSO configuration under Service Provider Configuration. ACS URL ACS URL listed in the AppDirect SSO configuration under Service Provider Configuration. Enable Single Logout false Subject Type UserId
Note: AppDirect will save this unique identifier to the External ID field on the user (only visible via the user API). It is used on subsequent logins for matching. It is recommended to use the user IDName ID Format urn:oasis:names:tc:SAML:2.0:nameid-format:persistent Issuer Issuer value is listed on the identity provider setup in the previous step and makes up part of the Salesforce org URL. For example, https:// appdirect-qa-dev-ed.my.salesforce.com.IdP Certificate Select the self-signed certificate associated with the identity provider created in the previous step. Verify Request Signatures false Encrypt SAML Response false Staging Algorithm for SAML Messages SHA1 - Click Save.
- Click Manage. Note the IdP-Intiated login URL in the SAML Login Information section. You will need this URL to add to the AppDirect Single Sign-on configuration page in the Login URL field.
To provide access to the connected app
- In Salesforce, click the gear icon and then select Setup.
- Go to Administration > Users > Permission Sets.
- From the Permission Sets table, click AppDirect User. The AppDirect User Permission Sets page appears.
- From the Apps section, click Assigned Connected Apps.
- Click Edit.
- Select AppDirect Single Sign On and then click Add to add it to the list of Enabled Connected Apps.
- Click Save.
- Repeat these steps for the AppDirect Admin permission set by clicking AppDirect Admin instead of AppDirect User in the Permission Sets table.
To configure deep link SSO
- In Salesforce, click the gear icon and then select Setup.
- Go to Platform Tools > Custom Code > Custom Settings.
- Click AppDirect Marketplace Settings. The AppDirect Marketplace Settings page appears.
- Click Manage and then click Edit. There should already be a default org level record in this custom setting with the Marketplace Domain and Name listed. Edit this record and set the SSO Enabled field to true.
- Click Save. This adds the SSO URL path elements into the deep link formula fields.
- Select the SSO Enabled checkbox.
- Click Save.
Deep link validation
- Log in to Salesforce as a user that is set up in AppDirect without the Company Admin role (ensure that the User.Email field matches the corresponding UUID for the record in AppDirect).
- Check that the AppDirect user is logged out of AppDirect.
- Go to an account, contact, or opportunity that exists both in AppDirect and Salesforce. The AppDirect_ID_c should match the corresponding UUID for the record in AppDirect.
- Click the AppDirect Link to open the link in a new browser.
You are routed to the record details page in AppDirect.
AppDirect Login
- While signed in to Salesforce, navigate to https://<marketplace>/byappdirect.com/login.
- Enter the AppDirect username and email address for the SSO user.
- Click Next.
The browser redirects you to the default landing page in AppDirect.
- While signed out of Salesforce, navigate to https://<marketplace>.byappdirect.com/login.
- Enter the AppDirect username and email address for the SSO user.
- Click Next. You are redirected to the Salesforce login page for the configured organization.
- Enter the username and password and then click Login.
The browser redirects you to the default landing page in AppDirect.
Just-in-time provisioning
To configure just-in-time provisioning for sales agents, you must add custom attributes to the SAML response and provide a mapping in the AppDirect SSO configuration.
To configure custom attribute mapping
- In Salesforce, click the gear icon and then select Setup.
- Go to Platform Tools > Apps > App Manager.
- From the App Name column, click the arrow in the row for AppDirect Single Sign On and then select Manage.
- From the Custom Attributes section, click New.
- Enter the following values for the new custom attribute:
Required Attribute Key Attribute Value Required FirstName $User.FirstName Required LastName $User.LastName Required Email $User.Email (could be email, personal email, and/or work email depending on client installation) Optional PersonalEmail $User.Email (could be email, personal email, and/or work email depending on client installation) Optional WorkEmail $User.Email (could be email, personal email, and/or work email depending on client installation) Optional HomePhone $User.Phone (could be home and/or work depending on client installation) Optional MobilePhone $User.Mobile Optional WorkPhone $User.Phone (could be home and/or work depending on client installation) Optional Country $User.Country Optional Role $User.AppDirect_User_Role_c Optional State $User.State Optional Title $User.Title Optional BillingDay No standard field. Create this field for just-in-time provisioning.
AppDirect just-in-time configuration
- In AppDirect, go to Manage > Account > Company Settings | Single Sign-on.
- Enable Automatic User Creation. This automatically creates users in AppDirect on first SSO login.
- Enable Update User Roles. This allows you to manage sales agent user roles from Salesforce.
AppDirect custom attribute mapping
- In AppDirect, go to Manage > Account > Company Settings | Company Settings | Single Sign-on. The Single Sign-On Configuration page opens.
- In the Attribute Mapping pane, click Add Attribute Mapping and create an entry for each of the following:
Required Attribute Key Attribute Value Required FirstName FirstName Required LastName LastName Required Email Email Optional PersonalEmail PersonalEmail Optional WorkEmail WorkEmail Optional HomePhone HomePhone Optional MobilePhone MobileMobile Optional WorkPhone WorkPhone Optional Country Country Optional Role Role Optional State State Optional Title Title Optional BillingDay BillingDay
What's next?
Export products from AppDirect to upload to Salesforce
References
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!