Cuir in eagar

Comhroinn trí


Tutorial: Microsoft Entra single sign-on (SSO) integration with Salesforce

In this tutorial, you'll learn how to integrate Salesforce with Microsoft Entra ID. When you integrate Salesforce with Microsoft Entra ID, you can:

  • Control in Microsoft Entra ID who has access to Salesforce.
  • Enable your users to be automatically signed-in to Salesforce with their Microsoft Entra accounts.
  • Manage your accounts in one central location.

Prerequisites

To get started, you need the following items:

  • A Microsoft Entra subscription. If you don't have a subscription, you can get a free account.
  • Salesforce single sign-on (SSO) enabled subscription.

Scenario description

In this tutorial, you configure and test Microsoft Entra SSO in a test environment.

  • Salesforce supports SP initiated SSO.

  • Salesforce supports Automated user provisioning and deprovisioning (recommended).

  • Salesforce supports Just In Time user provisioning.

  • Salesforce Mobile application can now be configured with Microsoft Entra ID for enabling SSO. In this tutorial, you configure and test Microsoft Entra SSO in a test environment.

To configure the integration of Salesforce into Microsoft Entra ID, you need to add Salesforce from the gallery to your list of managed SaaS apps.

  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
  2. Browse to Identity > Applications > Enterprise applications > New application.
  3. In the Add from the gallery section, type Salesforce in the search box.
  4. Select Salesforce from results panel and then add the app. Wait a few seconds while the app is added to your tenant.

Alternatively, you can also use the Enterprise App Configuration Wizard. In this wizard, you can add an application to your tenant, add users/groups to the app, assign roles, as well as walk through the SSO configuration as well. Learn more about Microsoft 365 wizards.

Configure and test Microsoft Entra SSO for Salesforce

Configure and test Microsoft Entra SSO with Salesforce using a test user called B.Simon. For SSO to work, you need to establish a link relationship between a Microsoft Entra user and the related user in Salesforce.

To configure and test Microsoft Entra SSO with Salesforce, perform the following steps:

  1. Configure Microsoft Entra SSO - to enable your users to use this feature.
  2. Configure Salesforce SSO - to configure the single sign-on settings on application side.
    • Create Salesforce test user - to have a counterpart of B.Simon in Salesforce that is linked to the Microsoft Entra representation of user.
  3. Test SSO - to verify whether the configuration works.

Configure Microsoft Entra SSO

Follow these steps to enable Microsoft Entra SSO.

  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.

  2. Browse to Identity > Applications > Enterprise applications > Salesforce > Single sign-on.

  3. On the Select a single sign-on method page, select SAML.

  4. On the Set up single sign-on with SAML page, click the edit/pen icon for Basic SAML Configuration to edit the settings.

    Edit Basic SAML Configuration

  5. On the Basic SAML Configuration section, enter the values for the following fields:

    a. In the Identifier textbox, type the value using the following pattern:

    Enterprise account: https://<subdomain>.my.salesforce.com

    Developer account: https://<subdomain>-dev-ed.my.salesforce.com

    b. In the Reply URL textbox, type the value using the following pattern:

    Enterprise account: https://<subdomain>.my.salesforce.com

    Developer account: https://<subdomain>-dev-ed.my.salesforce.com

    c. In the Sign-on URL textbox, type the value using the following pattern:

    Enterprise account: https://<subdomain>.my.salesforce.com

    Developer account: https://<subdomain>-dev-ed.my.salesforce.com

    Note

    These values are not real. Update these values with the actual Identifier, Reply URL and Sign-on URL. Contact Salesforce Client support team to get these values.

  6. On the Set up single sign-on with SAML page, in the SAML Signing Certificate section, find Federation Metadata XML and select Download to download the certificate and save it on your computer.

    The Certificate download link

  7. On the Set up Salesforce section, copy the appropriate URL(s) based on your requirement.

    Copy configuration URLs

Create a Microsoft Entra test user

In this section, you'll create a test user called B.Simon.

  1. Sign in to the Microsoft Entra admin center as at least a User Administrator.
  2. Browse to Identity > Users > All users.
  3. Select New user > Create new user, at the top of the screen.
  4. In the User properties, follow these steps:
    1. In the Display name field, enter B.Simon.
    2. In the User principal name field, enter the username@companydomain.extension. For example, B.Simon@contoso.com.
    3. Select the Show password check box, and then write down the value that's displayed in the Password box.
    4. Select Review + create.
  5. Select Create.

Assign the Microsoft Entra test user

In this section, you'll enable B.Simon to use single sign-on by granting access to Salesforce.

  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
  2. Browse to Identity > Applications > Enterprise applications > Salesforce.
  3. In the app's overview page, select Users and groups.
  4. Select Add user/group, then select Users and groups in the Add Assignment dialog.
    1. In the Users and groups dialog, select B.Simon from the Users list, then click the Select button at the bottom of the screen.
    2. If you are expecting a role to be assigned to the users, you can select it from the Select a role dropdown. If no role has been set up for this app, you see "Default Access" role selected.
    3. In the Add Assignment dialog, click the Assign button.

Configure Salesforce SSO

  1. In a different web browser window, sign in to your up Salesforce company site as an administrator

  2. Click on the Setup under settings icon on the top right corner of the page.

    Configure Single Sign-On settings icon

  3. Scroll down to the SETTINGS in the navigation pane, click Identity to expand the related section. Then click Single Sign-On Settings.

    Configure Single Sign-On Settings

  4. On the Single Sign-On Settings page, click the Edit button.

    Configure Single Sign-On Edit

    Note

    If you are unable to enable Single Sign-On settings for your Salesforce account, you may need to contact Salesforce Client support team.

  5. Select SAML Enabled, and then click Save.

    Configure Single Sign-On SAML Enabled

  6. To configure your SAML single sign-on settings, click New from Metadata File.

    Configure Single Sign-On New from Metadata File

  7. Click Choose File to upload the metadata XML file which you have downloaded and click Create.

    Configure Single Sign-On Choose File

  8. On the SAML Single Sign-On Settings page, fields populate automatically, if you want to use SAML JIT, select the User Provisioning Enabled and select SAML Identity Type as Assertion contains the Federation ID from the User object otherwise, unselect the User Provisioning Enabled and select SAML Identity Type as Assertion contains the User's Salesforce username. Click Save.

    Configure Single Sign-On User Provisioning Enabled

    Note

    If you configured SAML JIT, you must complete an additional step in the Configure Microsoft Entra SSO section. The Salesforce application expects specific SAML assertions, which requires you to have specific attributes in your SAML token attributes configuration. The following screenshot shows the list of required attributes by Salesforce.

    Screenshot that shows the JIT required attributes pane.

    If you still have issues with getting users provisioned with SAML JIT, see Just-in-time provisioning requirements and SAML assertion fields. Generally, when JIT fails, you might see an error like We can't log you in because of an issue with single sign-on. Contact your Salesforce admin for help.

  9. On the left navigation pane in Salesforce, click Company Settings to expand the related section, and then click My Domain.

    Configure Single Sign-On My Domain

  10. Scroll down to the Authentication Configuration section, and click the Edit button.

    Configure Single Sign-On Authentication Configuration

  11. In the Authentication Configuration section, Check the Login Page and AzureSSO as Authentication Service of your SAML SSO configuration, and then click Save.

    Configure Single Sign-On Authentication Service

    Note

    If more than one authentication service is selected, users are prompted to select which authentication service they like to sign in with while initiating single sign-on to your Salesforce environment. If you don’t want it to happen, then you should leave all other authentication services unchecked.

Create Salesforce test user

In this section, a user called B.Simon is created in Salesforce. Salesforce supports just-in-time provisioning, which is enabled by default. There is no action item for you in this section. If a user doesn't already exist in Salesforce, a new one is created when you attempt to access Salesforce. Salesforce also supports automatic user provisioning, you can find more details here on how to configure automatic user provisioning.

Test SSO

In this section, you test your Microsoft Entra single sign-on configuration with following options.

  • Click on Test this application, this will redirect to Salesforce Sign-on URL where you can initiate the login flow.

  • Go to Salesforce Sign-on URL directly and initiate the login flow from there.

  • You can use Microsoft My Apps. When you click the Salesforce tile in the My Apps portal, you should be automatically signed in to the Salesforce for which you set up the SSO. For more information about the My Apps portal, see Introduction to the My Apps portal.

Test SSO for Salesforce (Mobile)

  1. Open Salesforce mobile application. On the sign-in page, click Use Custom Domain.

    Salesforce mobile app Use Custom Domain

  2. In the Custom Domain textbox, enter your registered custom domain name and click Continue.

    Salesforce mobile app Custom Domain

  3. Enter your Microsoft Entra credentials to sign in to the Salesforce application and click Next.

    Salesforce mobile app Microsoft Entra credentials

  4. On the Allow Access page as shown below, click Allow to give access to the Salesforce application.

    Salesforce mobile app Allow Access

  5. Finally after successful sign-in, the application homepage will be displayed.

    Salesforce mobile app homepage Salesforce mobile app

Prevent application access through local accounts

Once you've validated that SSO works and rolled it out in your organization, disable application access using local credentials. This ensures that your conditional access policies, MFA, etc. will be in place to protect sign-ins to Salesforce.

Next steps

If you have Enterprise Mobility + Security E5 or another license for Microsoft Defender for Cloud Apps, then you can collect an audit trail of application activities in that product, which can be used when investigating alerts. In Defender for Cloud Apps, alerts can be triggered when user, admin, or sign-in activities don't comply with your policies. By connecting Microsoft Defender for Cloud Apps to Salesforce , Salesforce sign-in events are collected by Defender for Cloud Apps.

In addition, you can enforce Session Control, which protects exfiltration and infiltration of your organization’s sensitive data in real time. Session Control extends from Conditional Access. Learn how to enforce session control with Microsoft Defender for Cloud Apps.