Entra External - Support for eID
Last updated
Last updated
In this scenario, Microsoft Entra External (formerly known as Azure B2C), uses Fortified ID Access (Integrity) as an external SAML IdP to support authentication using a European eID. With this setup, it's possible to use eIDs such as BankID, SITHS, EFOS, Freja, Norwegian ID-porten, Foreign eID (eIDAS) or Suomi.fi to perform authentication(sign in) and/or sign up to Entra External. We also have a use case where Fortified ID Access act as an OIDC OP instead.
In the use case Foreign eID is used as the eID method and the Swedish test node at Sweden Connect that host a number of test users.
Working with an External IdP there are often two things to solve:
Sign in (authenticate to a published application)
Sign up (create an external account in the Entra External tenant)
In this use case we will describe Sign in. When it comes to Sign up there can be several way two solve that, for example:
The users are already created.
Use the build in Entra Sign up.
The added application will handle this
Fortified ID Access handles the creation of the account.
Contact us for more information regarding Sign up.
There are some prerequisite for this use case. You will need the following:
Fortified ID Access setup with eID of your choice
This use case assumes that you have Fortified ID Access set up to support authentication of users with an eID.
Entra ID
Entra External tenant
Administration tenant rights, e.g. Global administrator role
Host (DNS) name of the Fortified ID Access service (external access)
Browse to https://entra.microsoft.com/
Login to your Entra External tenant
You need to have Fortified ID Access running with one or more eID authenticators such as BankID, Freja or Foreign ID.
You need the XML metadata of your Fortified ID Access IdP available.
You need to have your IdP available on Internet so Entra can communicate with it.
Click Identity -> External identities -> All identity providers
Click Custom
Click Add new
Select SAML/WS-Fed
Add a display name, I will use dev.fortifiedid.se
Choose SAML as protocol
Add the domain name of your IdP
For populating metadata I selected Parse metadata file
Upload your Metadatafile
The three fields below should auto populate based on your metadata file.
In Metadata URL add your IdP URL if available.
Click Save
Click Identity -> External identities -> User flows
Click New user flow
Add a display name, e.g. User_flow_for_FortifiedID_eID
Click checkbox for your Identity provider, in this use case dev.fortifiedid.se
Add the User attributes you like to use
Click Create
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 which will run locally on your machine.
Click Identity -> External identities -> Applications
Click App registrations
Add a Name, e.g. Test FortifiedID eID app (SPA/react)
Leave Supported account types default
Redirect
Choose Single page-application (SPA)
Add value http://localhost:3000/redirect
Click Register
On the Test FortifiedID eID app (SPA/react) settings page
Click Quickstart
On the Customize your sign-in experience page, leave as default. At bottom click Continue
On Add your sign-in to a sample app, click Single page application (SPA).
Then click React
Download sample app and unzip
Install Node.js
Run in cmd/terminal
A browser should open and a page as below should present itself. This is a really basic app with focus onlhy on sign up and sign in.
Close browser and shutdown app
Click Identity -> External identities -> User flows
Click the user flow you created earlier, User_flow_for_FortifiedID_eID
Click Applications
Click + Add application
Select and add your application Test FortifiedID eID app (SPA/react)
If you like you can run Run user flow to verify your user flow
In summary, below will explain the authentication flow when doing sign in from Entra External. (as always, there are different ways of doing this depending of conditions.)
Fortified ID Access SAML IdP receives the authentication request from Entra External
User is authenticated using for example BankID, Freja, Foreign ID. In example below I use Foreign ID.
We extract data from authentication, fro example personal identification number (personnummer)
We make a query to Entra using the personal identification number
Do the user exits (if not we can create the user, not explained in this use case)
We assume in this use case there is a user with this personal identification number already exists.
We extract the Email address of the user
We add the Email to the following two attributes
mail (nameid in our SAML assertion)
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
We make an authentication response to Entra and the user is authenticated.
You have Fortified ID Access installed and:
Configured as an SAML IdP
A selector with one or more eID methods installed
SAML assertion pipe configured for Entra your External tenant
We need the Entra module to query Entra ID. Replace data below with your Entra tenant data.
Create a file called for example entra.json
Drop the file into folder: /../FortifiedID\mgmt-center\data\customer\access\config\modules
Add data below and save file
You might already have an SAML Assertion pipe. Below is an example how it could look like. Add or use as an start to create your own.