External - Use an eID as primary login method (SAML)
Scenario
Section titled “Scenario”Note. In this scenario a European eID will be the primary login method. No authentication is done using Entra credentials.
Microsoft Entra External ID can use Fortified ID Access as an external SAML Identity Provider (IdP) to enable authentication with European eIDs or any other authentication method supported by Fortified ID Access.
With this setup, users can authenticate (sign in) or register (sign up) to Entra External ID using eIDs such as BankID, SITHS, EFOS, Freja eID, Norwegian ID-porten, Foreign eID (eIDAS), or Suomi.fi.
In this scenario, Entra External ID acts as the SAML Service Provider (SP) and Fortified ID Access acts as the SAML Identity Provider (IdP).
Sign-In and Sign-Up Scenarios
Section titled “Sign-In and Sign-Up Scenarios”When integrating Entra External ID with an external IdP, two things need to be addressed:
- Sign-in - authenticating an existing federated Entra user account.
- Sign-up - creating a new Entra account based on external authentication.
This use case focuses only on the sign-in scenario.
&#xNAN;1. The account created in Entra needs to have an attribute that can be matched with the incoming SAML assertion. In this use case, the email address claim is used for that purpose.
&#xNAN;2. If the user does not exist, Entra can create a federated account. If you want to control the creation of new accounts, check out this use case, Verify if user exists
&#xNAN;3. If just-in-time sign-up is not used and users are pre-populated in Entra External ID, Microsoft recommends disabling sign-up in the user flow. See Disable sign-up in a sign-up and sign-in user flow.
Federated Accounts in Entra External ID
Section titled “Federated Accounts in Entra External ID”Users signing in to Entra External ID must have an existing federated account in Entra.
When using an external IdP for authentication, the Entra account must be of the federated type.
Accounts created through Entra's Sign-up feature while using an external IdP are automatically configured as federated.
Federated user accounts can also be created programmatically using the Microsoft Graph API.
Note: It is not possible to create federated users directly from the Entra UI.
If you already have existing native Entra External ID users (non-federated), you can migrate them to federated using the Graph API.
This process can also be automated using Fortified ID Automate.
Prerequisite
Section titled “Prerequisite”There are some prerequisites for this use case. You will need the following:
- Fortified ID Access - SAML Identity Provider
-
This use case assumes that you have Fortified ID Access configured to support authentication of users with an eID.
-
You need the Fortified ID Access IdP metadata. Download it from:
https://<access_idp_domain>/saml/metadata/<idp_id> -
This metadata file is imported when you add a new custom SAML identity provider in Entra External ID under Identity providers.
-
- Fortified ID Access - Entra External ID as SAML Service Provider
-
Entra External ID SP metadata cannot be generated automatically in this scenario. Instead, create a metadata file manually by using the template below and replace
<tenant_id>with the current Entra External ID tenant ID. -
The tenant ID can be found in Overview in the Entra admin portal.
<?xml version="1.0" encoding="UTF-8"?><EntityDescriptorxmlns="urn:oasis:names:tc:SAML:2.0:metadata"entityID="https://login.microsoftonline.com/<tenant_id>/"><SPSSODescriptorAuthnRequestsSigned="false"WantAssertionsSigned="true"protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"><NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</NameIDFormat><AssertionConsumerServiceBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"Location="https://<tenant_id>.ciamlogin.com/login.srf"index="0"isDefault="true" /></SPSSODescriptor></EntityDescriptor> -
Import this metadata file into Fortified ID Access when you add Entra External ID as a SAML SP / federation party.
-
After the SP is added in Fortified ID Access, add a custom SAML attribute on Attribute settings containing the current user's email address with the following key:
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
-
- Entra ID
- Entra External ID tenant
- Administrative tenant rights to manage identity providers and user flows
- All users who will log in with an external IdP as the first method need to have account type federated
- Host (DNS) name of the Fortified ID Access service for external access
Configure Fortified ID Access for Entra External ID
Section titled “Configure Fortified ID Access for Entra External ID”Export the Fortified ID Access IdP metadata
Section titled “Export the Fortified ID Access IdP metadata”-
Open the metadata endpoint below in a browser:
https://<access_idp_domain>/saml/metadata/<idp_id> -
Save the metadata file locally.
-
This file will be imported into Entra External ID in a later step.
Create Entra External ID SP metadata manually
Section titled “Create Entra External ID SP metadata manually”- Open a text editor.
- Paste the XML template from the Prerequisite section.
- Replace all occurrences of
<tenant_id>with the current Entra External ID tenant ID. - Save the file locally, for example as
entra-external-id-sp-metadata.xml.
Add Entra External ID as a SAML SP in Fortified ID Access
Section titled “Add Entra External ID as a SAML SP in Fortified ID Access”- In Fortified ID Access, add a new federation / SAML SP for Entra External ID.
- Import the metadata file you created manually for Entra External ID.
- Save the configuration.
Add the email claim in Fortified ID Access
Section titled “Add the email claim in Fortified ID Access”-
Open the Entra External ID SP configuration in Fortified ID Access.
-
Go to Attribute settings.
-
Add a custom SAML attribute.
-
Set the key to:
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress -
Set the value so that it contains the current person's email address.
-
Save the configuration.
Configure your Entra External ID tenant
Section titled “Configure your Entra External ID tenant”In summary, you create a connection to the external IdP, you create a user flow, and you register your application. The user flow is what links your application with the external IdP.
Login to your tenant
Section titled “Login to your tenant”- Browse to https://entra.microsoft.com/
- Login to your Entra External ID tenant
Add Fortified ID Access as a custom SAML IdP
Section titled “Add Fortified ID Access as a custom SAML IdP”-
Click Microsoft Entra ID -> External Identities -> All identity providers
-
Select the Custom tab
-
Click Add new -> SAML/WS-Fed
-
Enter a suitable Display name
-
Select SAML as Identity provider protocol
-
If you do not want Entra to validate the user's email domain against a configured federation domain, enable Domainless
-
Under metadata, choose Parse metadata file
-
Upload the Fortified ID Access metadata file downloaded from:
https://<access_idp_domain>/saml/metadata/<idp_id> -
Review the populated values
-
Click Save
Register your app
Section titled “Register your app”Note. Before you continue, you need to register your application in Entra.
At the end of this document we show how to register and use one of the example apps available in Entra. See section, Extra. Register an Entra example application
Add a User Flow
Section titled “Add a User Flow”- Click Identity -> External identities -> User flows
- Click New user flow
- Add a display name, for example User_flow_for_FortifiedID_eID_SAML
- Select your new SAML identity provider
- Add the user attributes you want to use
- Click Create
Add your application to the user flow
Section titled “Add your application to the user flow”- Click Identity -> External identities -> User flows
- Click the user flow you created earlier
- Click Applications
- Click + Add application
- Select and add your application
Extra. Register an Entra example application
Section titled “Extra. Register an Entra example application”Note. You can skip this step if you already have added your application.
For test we will use one of the example apps that is available in Entra and run it locally on your machine.
Create the app registration
Section titled “Create the app registration”- In your Entra External ID tenant
- Click Entra ID -> App registrations
- Add a Name, for example Test FortifiedID eID app (SPA/react)
- Leave Supported account types as default
- In Redirect URI (optional)
- Choose Single-page application (SPA)
- Add value http://localhost:3000/redirect
- Click Register
Open the Quickstart experience
Section titled “Open the Quickstart experience”- On the application settings page
- Click Quickstart
- On the Customize your sign-in experience page, leave the defaults and click Continue
- On the Try out your sign-up experience page, leave the defaults and click Continue
- On Add your sign-in to a sample app, click Single page application (SPA)
- Then click React
Run the sample app
Section titled “Run the sample app”-
Download the sample app and unzip it
-
Install Node.js
-
Run in a terminal:
Terminal window cd SPA && npm install && npm start -
A browser should open and show the sample app
-
Close the browser and stop the app when you are done testing
Verification
Section titled “Verification”Start the sign-in flow
Section titled “Start the sign-in flow”- Start the sign-in flow from your application or test application
Select the SAML option
Section titled “Select the SAML option”- Select the Fortified ID Access SAML option in the Entra user flow
Authenticate with your eID
Section titled “Authenticate with your eID”- Authenticate with your eID in Fortified ID Access
Verify the sign-in
Section titled “Verify the sign-in”- Verify that Entra External ID accepts the SAML response and signs the user in
Check the email claim
Section titled “Check the email claim”-
If the account mapping does not work, verify that the SAML assertion from Fortified ID Access includes the email claim:
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress