Close Menu
Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Facebook X (Twitter) Instagram
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    • Home
    • Intune
    • Windows
      • Modern Workplace
    • macOS
    • Android
    • iOS
    • Automation
      • Logic Apps
      • Intune Monitoring
      • GitHub
    • Security
      • Passwordless
      • Security
    • Speaking
    • About me
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Home»Security»Enable SSO for Salesforce with Azure AD
    Security

    Enable SSO for Salesforce with Azure AD

    Peter KlapwijkBy Peter KlapwijkAugust 22, 2017Updated:December 3, 201952 Mins Read

    I was doing some testing with the integration of Azure Active Directory with Salesforce to provide users a single sign-on (SSO) experience. It is possible for a lot of SaaS apps to provide SSO using Azure AD. When SSO configured using Azure AD the user can logon with the same set of credentials to Salesforce as they use to logon to Office 365.
    I setup Salesforce SSO with the settings provided by Microsoft in the Azure portal.

    I also setup Provisioning to automatically create Salesforce users based on Azure AD users by following the instructions provided by Microsoft.
    When everything was set, I checked if the new accounts were created in Salesforce and I run a test with one of the user accounts.
    But I got an error when using single sign-on “We can`t log you in. Check for an invalid assertion in the SAML Assertion Validator (available in Single Sign-On Settings) or check the login history for failed logins”.

    When I checked the SAML Validator I noticed the error “Unable to map the subject to a Salesforce.com user”.
    I checked the SSO settings I made using Microsoft`s manual and noticed after checking several times all the settings, we are using the Federation ID to logon to Salesforce.

    But the Federation ID field is blank for all the provisioned users. I filled in the UPN on one of the test accounts and after that I was able to successfully logon to Salesforce using SSO.
    Fortunately it is possible to add an extra attribute mapping to synchronize between Azure AD and Salesforce, to automate filling in the Federation ID.
    In the Azure portal navigate to the Salesforce application, on the tab Provisioning under Mappings click on Synchronize Azure Active Directory Users to Salesforce.com. From there at the bottom choose Add New Mapping and choose below settings:

    • Mapping Type: Direct
    • Source attribute: userPrincipalName
    • Default value if null: <BLANK>
    • Target attribute: FederationIdentifier
    • Match objects using attributes: No
    • Matching precedence: 0
    • Apply this mapping: Always

    After provisioning is successfully run again the Federation ID is filled in and SSO works for all users.

    Azure AD Conditional Access EMS Microsoft 365 Salesforce Security SSO
    Share. Facebook Twitter LinkedIn Email WhatsApp
    Peter Klapwijk
    • Website
    • X (Twitter)
    • LinkedIn

    Peter is a Security (Intune) MVP since 2020 and is working as Modern Workplace Engineer at Wortell in The Netherlands. He has more than 15 years of experience in IT, with a strong focus on Microsoft technologies like Microsoft Intune, Windows, and (low-code) automation.

    Related Posts

    Azure AD shows all devices

    August 28, 2017

    Issues with OneDrive sync client – Preview – UPDATED

    November 18, 2016

    Intune Mobile Application Management

    September 13, 2016
    View 5 Comments

    5 Comments

    1. Thomas on December 4, 2019 14:06

      Thanks, we had exactly that issue and no documentation at Microsoft or Salesforce helped out. On the Salesforce site you would need require expensive Premium support to get some kind of debug logs.

      Reply
      • Peter Klapwijk on December 5, 2019 16:31

        Good to know this old article is still of any help!

        Reply
    2. Joe on January 14, 2020 18:38

      I am testing SSO to Salesforce using O365 credentials, but based on some testing, users are getting prompted to authenticate using both Office 365 MFA, and Salesforce Authenticator. Is there a way to disable any MFA requirements within Salesforce, since O365 can control the access policies? Thanks in advance

      Reply
      • Peter Klapwijk on January 15, 2020 16:21

        Sorry Joe, I have no idea.
        I configured this with Salesforce only one time for a customer and shared the challenge I faced with the configuration in this post.

        Reply
    3. Max on February 25, 2021 01:43

      Great job!
      I have been pulling my hair off to figure this out.
      Thank you.

      Reply
    Leave A Reply Cancel Reply

    Peter Klapwijk

    Hi! Welcome to my blog post.
    I hope you enjoy reading my articles.

    Hit the About Me button to get in contact with me or leave a comment.

    Awards
    Sponsor
    Latest Posts

    Hide the “Turn on an ad privacy feature” pop-up in Chrome with Microsoft Intune

    April 19, 2025

    How to set Google as default search provider with Microsoft Intune

    April 18, 2025

    Using Windows Autopilot device preparation with Windows 365 Frontline shared cloud PCs

    April 13, 2025

    Using Visual Studio with Microsoft Endpoint Privilege Management, some notes

    April 8, 2025
    follow me
    • Twitter 4.8K
    • LinkedIn 6.1K
    • YouTube
    Tags
    Administrative Templates Android Automation Autopilot Azure Azure AD Browser Conditional Access Edge EMS Exchange Online Feitian FIDO2 Flow Google Chrome Graph Graph API Identity Management Intune Intune Monitoring iOS KIOSK Logic Apps macOS MEM MEMMonitoring Microsoft 365 Microsoft Edge Microsoft Endpoint Manager Modern Workplace Office 365 OneDrive for Business Outlook Passwordless PowerApps Power Automate Security SharePoint Online Teams Windows Windows 10 Windows10 Windows 11 Windows Autopilot Windows Update
    Copy right

    This information is provided “AS IS” with no warranties, confers no rights and is not supported by the authors, or In The Cloud 24-7.

     

    Copyright © 2025 by In The Cloud 24-7/ Peter Klapwijk. All rights reserved, No part of the information on this web site may be reproduced or posted in any form or by any means without the prior written permission of the publisher.

    Shorthand; Don’t pass off my work as yours, it’s not nice.

    Recent Comments
    • Peter Klapwijk on Using Windows Autopilot device preparation with Windows 365 Frontline shared cloud PCs
    • John M on Using Windows Autopilot device preparation with Windows 365 Frontline shared cloud PCs
    • Christoffer Jakobsen on Connect to Azure file shares with Microsoft Entra Private Access
    • Ludo on How to block Bluetooth file transfer with Microsoft Intune
    • RCharles on Automatically configure the time zone (during Autopilot enrollment)
    most popular

    Application installation issues; Download pending

    October 1, 2024

    Restrict which users can logon into a Windows 10 device with Microsoft Intune

    April 11, 2020

    How to change the Windows 11 language with Intune

    November 11, 2022

    Update Microsoft Edge during Windows Autopilot enrollments

    July 9, 2024
    Peter Klapwijk – In The Cloud 24-7
    X (Twitter) LinkedIn YouTube RSS
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.

    Manage Cookie Consent
    To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
    Functional Always active
    The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
    Preferences
    The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
    Statistics
    The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
    Marketing
    The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
    Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
    View preferences
    {title} {title} {title}