---
title: "Salesforce SAML 2.0 SSO Setup"
canonical: "https://help.agiloft.com/space/HELP/43715780/Salesforce+SAML+2.0+SSO+Setup"
format: markdown
---
This article provides instructions for setting up SAML 2.0 single sign-on (SSO) with Salesforce as the Identity Provider (IdP). It also includes instructions on how to log in with SSO after the integration and make sure other users log in with SSO as well.

> Macro (include)

# Set Up SAML 2.0 SSO

> Macro (include)

## > Macro (anchor)

Create a SAML SSO Profile

> Macro (include)

## > Macro (anchor)

Configure Service Provider Details

> Macro (include)

At this point, you can't finish the setup in Agiloft until you configure your IdP. Continue to [Configure Salesforce](#configure_idp) for instructions on setting up your IdP.

## > Macro (anchor)

Configure Salesforce

Follow the steps below to integrate Agiloft as a SAML service provider in Salesforce.

> ℹ️ These are general steps for adding a SAML service provider to Salesforce. If the options you see in the console or your practices for adding service providers differ from those described here, refer to Salesforce's [documentation](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create_saml_sso.htm&type=5) on integrating service providers as connected apps with SAML to complete the task.

1. First, download the X.509 certificate from Agiloft:
  1. Go to **Setup > Access > Configure SAML 2.0 Profiles**.
  2. Select the profile for this IdP, then click Download X.509 Certificate. The file is downloaded as a .txt file.
  3. Go to the directory where the certificate was downloaded.
  4. Rename the file to change the extension from `.txt` to `.crt`.
2. Now, go back to **Setup > Access > Configure SAML 2.0 Profiles** and edit the profile for this IdP.
3. Go to the Service Provider Details tab.
4. Leave the Agiloft Service Provider Details open in your browser, and log in to the Salesforce Setup console in another tab.
5. In Salesforce Setup, go to the domain in which you want to add a service provider.
6. If necessary, enable Salesforce as an identity provider:
  1. Under Settings in the sidebar, go to **Identity > Identity Provider**.
  2. In Identity Provider Setup, click Enable Identity Provider.
  3. Next, select the certificate Salesforce should use for SAML communication, then click Save. The identity provider details are displayed.
7. Click Download Metadata to download the IdP metadata XML file. You use the contents of this file to configure the identity provider details in Agiloft.
8. Next, in the sidebar under Platform Tools, go to **Apps > App Manager**.
9. At the top of the screen, click New Connected App.
10. Select Create a Connected App and click Continue.
11. On the New Connected App screen, enter the required Basic Information and configure any optional settings.
12. Under Web App Settings, select the Enable SAML checkbox. Then complete the following fields:
  1. **Entity Id**: The URL from the Agiloft (SP) Entity Id field in Agiloft.
    - If you updated the KB to support multiple SAML providers, the URL looks similar to: `https://example.agiloft.com/gui2/spsamlsso?project=Example_KB_Name__65cddbb0-63e5-4adf-a002-e23b2ab9f65e`
    - If you didn't update the KB to support multiple profiles, the URL looks similar to: `https://example.agiloft.com/gui2/spsamlsso?project=Example_KB_Name`
  2. **ACS URL**: The URL from the SAML 2.0 Assertion Consume Service (ACS) Endpoint field in Agiloft. For example: `https://example.agiloft.com:443/gui2/spsamlsso?project=Example+KB+Name` or `https://example.agiloft.com/gui2/spsamlsso?project=Example+KB+Name&profileId=65cddbb0-63e5-4adf-a002-e23b2ab9f65e`
  3. **Subject Type**: Select the same identifier you selected in the "Name identifier format in SAML Assertion sent by IdP" field in Agiloft. Or select a different identifier and change the value in Agiloft to match.
  4. **Name ID Format**: Accept the default value of unspecified.
  5. **IdP Certificate**: Select the same certificate you chose when enabling Salesforce as an identity provider.
  6. **Verify Request Signatures**: Select this checkbox to enable it. Then browse for and select the X.509 certificate you downloaded from Agiloft.
13. Complete any optional fields as needed, then click Save at the bottom of the screen. The console displays the details for the new app.
14. If you want to create or update user records in Agiloft based on attributes from Salesforce, add custom attributes to the app. See Salesforce's [documentation](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_edit_custom_attributes.htm&type=5) on adding custom attributes to a connected app for instructions.
15. Finally, make sure you give access to the application to the users who need to log in to Agiloft with SAML. See Salesforce's [documentation](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_manage_additional_settings.htm&language=en_us&type=5) on managing access settings for a connected app for information.

Now that Salesforce is configured, return to Agiloft. If you want to configure IdP attribute to Agiloft field mappings, continue to [Configure User Group, Team, and Fields Mapping](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43715780/Salesforce+SAML+SSO#SalesforceSAMLSSO-mapping) below. If you don't want to configure mappings, proceed to [Configure Identity Provider Details](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43715780/Salesforce+SAML+SSO#SalesforceSAMLSSO-identity_provider).

## > Macro (anchor)

Configure User Group, Team, and Fields Mapping

> Macro (include)

### > Macro (anchor)

SAML Attribute Mapping

The following image shows custom attributes that are configured for a SAML application in Salesforce:

![image](media://f850c552-3432-4efe-8d3c-821c9a2d08e0)

To map the attributes to fields in Agiloft, enter the Keys in the relevant fields on the User Field(s) Mapping tab.

![Attribute mapping on the User Fields tab in Agiloft](media://6dc2e145-ea64-4357-91e8-199657bd8d06)

Now that user, group, and team mappings are configured, proceed to [Configure Identity Provider Details](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43715780/Salesforce+SAML+SSO#SalesforceSAMLSSO-identity_provider) to complete the SAML SSO setup.

## > Macro (anchor)

Configure Identity Provider Details

> Macro (include)

# > Macro (anchor)

Log in with SAML

> Macro (include)

# Force SSO Login

> Macro (include)

# > Macro (anchor)

Generating a Key Pair

> Macro (include)

> Macro (hide-if)
> 
> #### Related articles
> 
> > Macro (contentbylabel)