Active Directory: AD FS and Entra ID
This page brings together, step by step, the three ways of connecting FoxPlan to a Microsoft directory. Settings shared by all providers — sign-in methods, MFA, certificate authentication, provisioning, SCIM — are described in Enterprise SSO & MFA.
Choose the method
| Method | When to choose it | Provider in FoxPlan |
|---|---|---|
| AD FS with SAML 2.0 | AD FS, all versions. The most common choice, and the only one possible before Windows Server 2016 | SAML 2.0 |
| AD FS with OpenID Connect | AD FS 2016 or later, when the security policy prefers OIDC | Custom OIDC |
| Microsoft Entra ID | Directory in the Microsoft cloud (formerly Azure AD), synchronised with the on-premises AD or not | Microsoft |
All three lead to the same FoxPlan session. They are configured in Settings → Enterprise → Sign-in methods, which is reserved for FoxPlan account administrators.
Common prerequisites
- The mail attribute of AD accounts. FoxPlan matches the user to their account by their email address. The
mailattribute (the E-mail field in the console) must be filled in, and identical to the email of the FoxPlan account. An AD account without an email is refused. - The first FoxPlan account exists. The URLs to declare at the provider contain the enterprise identifier, created with the first administrator account.
- One AD group per population, if FoxPlan is to create the accounts itself (see Accounts and AD groups). For example
GG-FoxPlan-Utilisateurs. - Clocks on time on the FoxPlan server and on AD FS: an assertion or a token is only valid for a few minutes.
The FoxPlan server calls the provider itself: AD FS metadata, code exchange in OIDC. If AD FS presents a certificate signed by the company PKI, place the certificate of that authority in ca-sortant/ — see Inbound and outbound certificates. With Entra ID, the server must be able to reach login.microsoftonline.com over HTTPS.
AD FS with SAML 2.0
1. Declare AD FS in FoxPlan
- Settings → Enterprise → Sign-in methods → Add SSO configuration, provider SAML 2.0, display name for example "Company account (AD FS)".
- Metadata URL:
https://<federation service>/FederationMetadata/2007-06/FederationMetadata.xml. The entity ID, the SSO URL and the signing certificate are read from it: leave those fields empty. - Binding: HTTP-POST or HTTP-Redirect, AD FS accepts both. The email attribute in the advanced options can keep its default value.
- Save, then click Check the configuration and copy the two URLs displayed.
| Label on screen | Value | Use in AD FS |
|---|---|---|
| Service provider entity ID | https://<FoxPlan domain>/saml2/service-provider-metadata/<enterprise id>-saml2 | Metadata URL to import, and identifier |
| Assertion consumer service URL (ACS) | https://<FoxPlan domain>/login/saml2/sso/<enterprise id>-saml2 | Return endpoint, in POST |
The federation service name can be read in the AD FS console (right-click Service → Edit Federation Service Properties) or with (Get-AdfsProperties).HostName.
The "URL not probed: address is not public" warning from the check is normal for an internal address: this check never probes the private network.
2. Declare FoxPlan in AD FS
On the AD FS server, AD FS Management console (Microsoft.IdentityServer.msc):
- Relying Party Trusts → Add Relying Party Trust… → Claims aware.
- Import data about the relying party published online: paste the FoxPlan entity ID — the
…/saml2/service-provider-metadata/…URL, not the ACS URL. - Display name: "FoxPlan". Access control policy: according to your policy, for example Permit everyone, or an AD group.
- Finish the wizard. In Properties, check: Identifiers tab = FoxPlan entity ID; Endpoints = ACS URL in POST; Encryption = no certificate; Advanced = SHA-256.
Common import errors
-
Could not create SSL/TLS secure channel: the AD FS console, a .NET application, does not offer TLS 1.2, which FoxPlan requires. Enable it for .NET in an administrator PowerShell, then reopen the console:
foreach ($k in 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319','HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319') {Set-ItemProperty -Path $k -Name SchUseStrongCrypto -Value 1 -Type DWordSet-ItemProperty -Path $k -Name SystemDefaultTlsVersions -Value 1 -Type DWord}Restart-Service adfssrvWithout touching the registry: save the FoxPlan metadata from a browser and choose import from a file.
-
CData elements not valid at top level of an XML document: the pasted URL is the ACS URL, which returns a web page. Paste the entity ID.
Expected result: in Properties → Monitoring, Test URL displays "The federation metadata URL was validated successfully".
3. Claim rule
With FoxPlan selected, Actions pane on the right → Edit Claim Issuance Policy… → Add Rule… → template Send LDAP Attributes as Claims, attribute store Active Directory. If the rule already exists, select it and use Edit Rule….
| LDAP Attribute | Outgoing Claim Type | |
|---|---|---|
| E-Mail-Addresses | E-Mail Address | required |
| Given-Name | Given Name | first name |
| Surname | Surname | last name |
| Token-Groups - Unqualified Names | Group | only for provisioning |
Make sure to choose Token-Groups - Unqualified Names: the Qualified by Domain Name form also works, but not as SIDs.
Second rule: the subject identifier (Name ID). FoxPlan rejects an assertion without a Name ID (log subject_not_found). This rule issues it explicitly, from the email address. Add Rule… → Transform an Incoming Claim template:
| Field | Value |
|---|---|
| Incoming claim type | E-Mail Address |
| Outgoing claim type | Name ID |
| Outgoing name ID format | |
| Option | Pass through all claim values |
Place it after the LDAP rule: it transforms the address that rule produces. An account whose mail attribute is empty in AD therefore gets no Name ID.
Expected result, in PowerShell on the AD FS server:
(Get-AdfsRelyingPartyTrust -Name FoxPlan).IssuanceTransformRules
displays an LdapClaims rule containing query = ";mail,givenName,sn,tokenGroups;{0}", and http://schemas.xmlsoap.org/claims/Group as the last claim type. A second rule issues http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier.
4. Test
Go to the sign-in test.
Not supported: signing of authentication requests, assertion encryption, SAML sign-out (Single Logout). Do not declare an encryption certificate and do not require signed requests.
AD FS with OpenID Connect
Available from AD FS 2016. FoxPlan is declared as a server application, with a shared secret.
1. Prepare the redirect URL
The FoxPlan redirect URL is:
https://<FoxPlan domain>/login/oauth2/code/<enterprise id>-custom
The enterprise identifier can be read in Check the configuration of any SSO configuration, or in the SAML URL above. The simplest way: first create the Custom OIDC configuration in FoxPlan with temporary values, disabled, and copy the URL displayed by Check the configuration.
2. Create the application group in AD FS
AD FS Management console → Application Groups → Add Application Group…:
- Template Server application accessing a web API (Client-Server applications section), name "FoxPlan".
- Server application: note the Client Identifier (a GUID). Add the redirect URL above in Redirect URI.
- Configure Application Credentials: tick Generate a shared secret and copy it: it is never displayed again.
- Configure Web API: in Identifier, enter the same Client Identifier as the server application. This is what places the claims from step 3 in the identity token read by FoxPlan.
- Choose Access Control Policy: according to your policy.
- Configure Application Permissions: tick the scopes
openid,profile,emailandallatclaims.
3. Claim rule
Application Groups → FoxPlan → Properties → select the Web API → Edit… → Issuance Transform Rules tab → Add Rule… → Send LDAP Attributes as Claims, attribute store Active Directory, with the same table as in SAML:
| LDAP Attribute | Outgoing Claim Type |
|---|---|
| E-Mail-Addresses | E-Mail Address |
| Given-Name | Given Name |
| Surname | Surname |
| Token-Groups - Unqualified Names | Group (for provisioning) |
In the token, AD FS sends them under the short names email, given_name, family_name and group, which FoxPlan recognises.
4. Declare AD FS in FoxPlan
Sign-in methods → Custom OIDC configuration:
| Field | Value |
|---|---|
| Issuer URI | https://<federation service>/adfs |
| Client ID | The AD FS Client Identifier |
| Client authentication | Client secret: the secret generated in step 2 |
| Scopes | openid,profile,email,allatclaims |
| Username attribute | sub (default value) |
FoxPlan reads the document https://<federation service>/adfs/.well-known/openid-configuration. Check the configuration verifies that it is reachable and that the issuer matches.
Expected result, in PowerShell on the AD FS server:
Get-AdfsServerApplication -ApplicationGroupIdentifier FoxPlan | Select-Object Identifier, RedirectUri
Get-AdfsWebApiApplication -ApplicationGroupIdentifier FoxPlan | Select-Object Identifier, IssuanceTransformRules
Get-AdfsApplicationPermission | Where-Object ClientRoleIdentifier -eq '<Client Identifier>' | Select-Object ScopeNames
The server application identifier is among the Web API identifiers, the rule contains mail, and the scopes include openid, email and allatclaims.
Without the allatclaims scope, or if the Web API identifier differs from the Client Identifier, the token contains no email: FoxPlan then refuses the sign-in.
Microsoft Entra ID
1. Register FoxPlan in Entra ID
Microsoft Entra admin center → Applications → App registrations → New registration:
- Name "FoxPlan", Accounts in this organizational directory only.
- Redirect URI: Web platform,
https://<FoxPlan domain>/login/oauth2/code/<enterprise id>-microsoft(displayed by Check the configuration of the Microsoft configuration in FoxPlan). - On the Overview page, note the Application (client) ID and the Directory (tenant) ID.
- Certificates & secrets: create a client secret and copy its value, or upload a certificate — see Client authentication: secret or certificate. A secret expires: note its date.
- API permissions: Microsoft Graph, delegated permissions
openid,profile,email(andUser.Read, present by default), then Grant admin consent. - Token configuration:
- Add optional claim → ID →
email. Without it, FoxPlan falls back on the UPN (preferred_username), which is only suitable if it is identical to the email address. - Add groups claim, for provisioning: Groups assigned to the application (recommended) or Security groups. Format in the identity token: Group ID by default; sAMAccountName if the groups come from a synchronised on-premises AD, to designate them by name.
- Add optional claim → ID →
2. Restrict access
Enterprise applications → FoxPlan → Properties → Assignment required? = Yes, then Users and groups → add the authorised groups. Without this restriction, any account in the directory can start the sign-in; FoxPlan then refuses those it does not know.
3. Declare Entra ID in FoxPlan
Sign-in methods → Microsoft configuration:
| Field | Value |
|---|---|
| Issuer URI | https://login.microsoftonline.com/<Directory (tenant) ID>/v2.0 |
| Client ID | The Application (client) ID |
| Client authentication | Client secret or certificate |
| Scopes | openid,profile,email |
| Username attribute | sub (default value) |
Replace the suggested value …/common/v2.0 with your tenant identifier: sign-in then stays limited to your directory.
Entra ID with SAML 2.0 remains possible (Enterprise applications → New application → Create your own application → Single sign-on → SAML): Identifier = FoxPlan entity ID, Reply URL = ACS URL, and in FoxPlan the App Federation Metadata Url provided by Entra. OIDC remains simpler to maintain.
SCIM: Entra ID can also push users and groups and apply departures immediately — see Automatic provisioning with SCIM.
Accounts and AD groups
A user gets their FoxPlan account in one of two ways:
- Invitation (default): the administrator invites them from FoxPlan with their directory email address. A sign-in by a user unknown to FoxPlan is refused.
- Provisioning at sign-in: FoxPlan creates the account at the first sign-in of members of a linked AD group. The account is created as Workspace member, with no rights and no licence; the administrator then gives it a role.
For provisioning, three settings:
- The provider sends the groups: Token-Groups line of the AD FS rule, or Entra ID groups claim.
- In the SSO configuration, User provisioning panel: tick Create accounts and synchronise groups at sign-in. Leave Groups attribute empty: FoxPlan recognises
group,groups,memberOfand the AD FS Group and Role claims. In Email domains, choose the domain of your addresses (client.fr): without it, the sign-in screen does not offer SSO to a user it does not know yet, and their account is never created. Only the domains reserved by your license are listed. - In FoxPlan, Workspace → User access → New group, then Linked AD groups: one group per line. This field does not exist on default groups: create a dedicated group.
| Method | Value to enter in "Linked AD groups" |
|---|---|
| AD FS (SAML or OIDC) | The group name: GG-FoxPlan-Utilisateurs (the form CONTOSO\GG-FoxPlan-Utilisateurs is also recognised) |
| Entra ID, Group ID format | The group's Object ID (a GUID, on the group's Overview page) |
| Entra ID, sAMAccountName format | The group name, as for AD FS |
The comparison ignores case and the domain prefix. At each sign-in, membership of the linked FoxPlan groups follows that of the directory; a member added manually is never removed. The detailed rules — intersection with All users, AD badge, departures — are in User provisioning and AD groups.
Check a group in AD, in PowerShell on a domain controller or the AD FS server:
Get-ADGroup GG-FoxPlan-Utilisateurs
Get-ADGroupMember GG-FoxPlan-Utilisateurs | Select-Object Name, SamAccountName
Get-ADUser alice.martin -Properties mail, memberOf
Expected result: the group is displayed (otherwise "Cannot find an object with identity"), its members are listed, and Get-ADUser shows the mail attribute filled in and the group in memberOf.
Enable and test
- In Sign-in methods, tick Enterprise SSO. Untick password for users if your policy requires it: FoxPlan account administrators keep it.
- Open a private browsing window, go to FoxPlan, enter the email and choose the company sign-in.
- On the Microsoft page, sign in with a directory account:
DOMAIN\useroruser@domainfor AD FS, the Microsoft sign-in address for Entra ID.
The administrator account created at installation exists only in FoxPlan. Entered on the AD FS page, it is refused: AD FS displays an error page and its AD FS → Admin log records events 342 and 364 "The user name or password is incorrect". Test with a directory account, in a private window: otherwise the session open at the provider automatically signs the previous account back in.
Expected result: the user lands on the FoxPlan home page. The server logs show [SAML] connexion <enterprise id>-saml2 convertie pour alice.martin@client.fr, then Redirecting to home page: /. On the first sign-in of a provisioned user, [PROVISIONING] compte créé pour … and [PROVISIONING] … rejoint le groupe « … » are added.
Sign-out: signing out of FoxPlan does not close the session opened at the identity provider (8 hours by default with AD FS). The next sign-in resumes the same account without asking for the password. To switch accounts, use a private window, close the browser or, with AD FS, open https://<AD FS server>/adfs/ls/?wa=wsignout1.0.
Removing access: removing a user from the AD group does not remove their access. On their next sign-in they leave the FoxPlan group ([PROVISIONING] … quitte le groupe) but keep their account. Disable the account in AD instead: the provider then refuses the sign-in. Then delete the user in FoxPlan to free their license.
Troubleshooting
| Symptom | Probable cause |
|---|---|
| AD FS error page, events 342 / 364 "user name or password is incorrect" | Identifier unknown to the directory, or wrong password |
| AD FS error page, event 364 on the FoxPlan relying party | Read the event details in Event Viewer → Applications and Services Logs → AD FS → Admin |
| Back on FoxPlan with a refusal, unknown user | Neither invited nor provisioned: email absent from FoxPlan, or user in no linked group |
| Refusal for missing email | mail attribute empty in AD; claim rule without E-Mail-Addresses; with AD FS OIDC, allatclaims scope missing; with Entra ID, optional email claim missing and UPN different from the address |
Back on FoxPlan with a refusal, log subject_not_found (“is missing a subject”) | AD FS with SAML: no Name ID in the assertion. Second claim rule missing or placed before the LDAP rule, or mail attribute empty in AD |
| Account created, but in no group | Groups not sent by the provider, or name entered in "Linked AD groups" different (GUID expected with Entra in Group ID format) |
Entra AADSTS50011 | Redirect URL different from the one declared in App registrations |
Entra AADSTS50105 | Assignment required, and the user is in no group assigned to the application |
Entra AADSTS7000215 | Client secret wrong or expired |
The FoxPlan server logs give the details on the application side: in a Docker installation, docker compose logs product-server | grep -E "SAML|PROVISIONING|OAuth2".