Maak verbinding met Microsoft Entra ID met WS-Federation

Gebruik FoxIDs als WS-Federation Security Token Service (STS) voor een federatief Microsoft Entra ID-domein en federatieve Windows-aanmelding.

FoxIDs kunnen worden gebruikt als federatieve identiteitsprovider voor Microsoft Entra-aangesloten en Microsoft Entra-hybride aangesloten Windows-apparaten.

In een federatieve omgeving vereist Microsoft Entra ID ondersteuning voor WS-Federation en WS-Trust voor aanmelding bij Windows. FoxIDs onthult de WS-Federation-metagegevens, het MEX-eindpunt en het actieve WS-Trust UsernameMixed-eindpunt dat vereist is voor deze Microsoft Entra ID- en Windows-stromen. FoxIDs voegt geen apparaten toe en registreert deze niet; apparaatregistratie wordt afgehandeld door Microsoft Entra ID en Windows.

Organisaties die AD FS gebruiken voor Microsoft Entra ID-domeinfederatie kunnen FoxIDs gebruiken voor de rol van federatieve identiteitsprovider die in deze handleiding wordt beschreven.

Configureer FoxIDs

In deze handleiding wordt beschreven hoe u FoxIDs configureert als de STS voor een federatief Microsoft Entra ID-domein. Gebruikers zijn verbonden met Microsoft Entra ID-gebruikers met hun Immutable ID.

1 - Create the Microsoft Entra ID WS-Federation application in FoxIDs Control Client

The recommended setup is to use the Connect to Microsoft Entra ID application template. The template enables Microsoft Entra ID Windows sign-in, configures the WS-Federation metadata URL, adds the required issue claim and claim transforms, and uses an application-specific issuer.

  1. Select the Applications tab.
  2. Click Add application.
  3. Select Connect to Microsoft Entra ID with the WS-Federation badge.
  4. Add the display name, e.g. Microsoft Entra ID.
  5. Select Automatic federation (recommended).
  6. Add the verified Microsoft Entra domain to synchronise. Creating the Microsoft Entra ID template with Automatic federation and domain input
  7. Click Create.
  8. Click Set up Microsoft Entra federation.

If automatic federation is not available in a self-hosted deployment, configure the automatic Microsoft Entra ID sync app registration first or select Manual federation and configure Microsoft Entra ID manually.

2 - Grant consent and synchronise Microsoft Entra federation

Automatic federation uses Microsoft Graph to create or update the Microsoft Entra ID domain internalDomainFederation configuration. FoxIDs synchronises the WS-Federation endpoints, the MEX endpoint, the active WS-Trust endpoint, the primary signing certificate and the secondary signing certificate if one exists.

Microsoft Entra federation setup with Grant Microsoft admin consent and Synchronise federation

  1. In the Microsoft Entra ID template, click Grant Microsoft admin consent.
  2. Sign in as a Microsoft Entra administrator for the tenant that owns the domain and accept the consent.
  3. Return to FoxIDs Control.
  4. Click Synchronise federation.
  5. Verify that the synchronisation status is successful.

After the first successful synchronisation, Microsoft Entra ID trusts the FoxIDs WS-Federation application registration for the configured domain. FoxIDs also checks the federation during federated Windows sign-in and synchronises again if the signing certificate has changed or the previous synchronisation was not successful.

If synchronisation reports that the existing Microsoft Entra federation issuer does not match this FoxIDs application registration, review the domain ownership before choosing to take over the federation. Taking over changes the Microsoft Entra domain to trust this FoxIDs application registration.

3 - Configure the users' Immutable ID claims

Microsoft Entra ID expects an Immutable ID claim in the WS-Federation token. The claim value must match the user's onPremisesImmutableId in Microsoft Entra ID.

The Microsoft Entra ID template adds the required issue claims and claim transforms. You still need to make sure each user has an immutable_id claim with the base64 value that matches the user in Microsoft Entra ID.

Internal user with the immutable_id claim configured

Microsoft Entra ID documentation lists the UPN claim as part of the expected WS-Federation token claims. FoxIDs issues:

  • http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn

from the user's upn claim. User matching is normally based on the Immutable ID, but adding the UPN claim keeps the token aligned with Microsoft's expected WS-Federation claim set.

You need to set the user's Immutable ID as a claim in FoxIDs. To set the Immutable ID on an internal user, select the Users tab and then the Internal Users tab, find the user, and add a claim with the claim type immutable_id and the value of the Immutable ID in Microsoft Entra ID. It should be base64 encoded. The immutable_id claim type is mapped to the SAML claim URI http://schemas.foxids.com/ws/identity/claims/immutableid in FoxIDs. To issue the UPN claim for an internal user, add a claim with the claim type upn and the user's Microsoft Entra ID user principal name, e.g. user@your-domain.com. FoxIDs maps the internal upn claim to http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn. Manual FoxIDs configuration

Use manual configuration only if you do not use the Microsoft Entra ID template.

  1. Selecteer het tabblad Toepassingen.
  2. Klik op Nieuwe aanvraag.
  3. Klik op Alle opties weergeven.
  4. Klik op Webapplicatie met de badge WS-Federation.
  5. Voeg de Naam toe, b.v. Microsoft Entra ID.
  6. Kies handmatige configuratie.
  7. Stel Applicatiedomein in op urn:federation:MicrosoftOnline.
  8. Stel Antwoord-URL in op https://login.microsoftonline.com/login.srf.
  9. Stel Uitlog-URL in op https://login.microsoftonline.com/login.srf.
  10. Behoud Tokentype als SAML 1.1, tenzij Microsoft Entra ID is geconfigureerd voor een ander tokentype.
  11. Klik op Maken.
  12. Open de applicatie en schakel Microsoft Entra ID Windows sign-in in onder de geavanceerde WS-Federation-instellingen.

Manual Immutable ID claim transform

Microsoft Entra ID verwacht een Immutable ID-claim in het WS-Federation-token. De claimwaarde moet overeenkomen met onPremisesImmutableId van de gebruiker in Microsoft Entra ID.

  1. Klik op Applicatie wijzigen om de applicatie in de bewerkingsmodus te openen.
  2. Selecteer het tabblad Claimtransformaties.
  3. Klik op Claimtransformatie toevoegen en klik op Kaart.
  4. Stel Nieuwe claim in op http://schemas.microsoft.com/LiveID/Federation/2008/05/ImmutableID.
  5. Stel Selecteer claim in op http://schemas.foxids.com/ws/identity/claims/immutableid.
  6. Klik op Bijwerken.

De Microsoft Entra ID-documentatie vermeldt de UPN-claim als onderdeel van de verwachte WS-Federation-tokenclaims. FoxIDs geeft uit:

  • http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn

vanuit de upn-claim van de gebruiker. Gebruikersmatching is normaal gebaseerd op de Immutable ID, maar het toevoegen van de UPN-claim houdt het token in lijn met de door Microsoft verwachte WS-Federation-claims.

U moet de Immutable ID van de gebruiker instellen als claim in FoxIDs. Als u de Immutable ID voor een interne gebruiker wilt instellen, selecteert u het tabblad Gebruikers en vervolgens het tabblad Interne gebruikers, zoekt u de gebruiker en voegt u een claim toe met het claimtype immutable_id en de waarde van de Immutable ID in Microsoft Entra ID. Het moet base64-gecodeerd zijn. Het claimtype immutable_id wordt toegewezen aan de SAML-claim-URI http://schemas.foxids.com/ws/identity/claims/immutableid in FoxIDs. Om de UPN-claim voor een interne gebruiker uit te geven, voegt u een claim toe met claimtype upn en de Microsoft Entra ID user principal name van de gebruiker, bijvoorbeeld user@your-domain.com. FoxIDs mapt de interne upn-claim naar http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn.

Manual Microsoft Entra ID federation values

Open de registratie van de WS-Federation-applicatie en kopieer de waarden die nodig zijn voor Microsoft Entra ID-domeinfederatie:

  • Federatie-metagegevens
  • Realm / uitgever
  • Passieve inlog-URL
  • Uitlog-URL
  • MEX-eindpunt
  • Actief WS-Trust-eindpunt

Microsoft Entra ID leest de FoxIDs ondertekeningscertificaten van de Federatie Metadata-URL. Daarom kunt u de standaard rollende FoxIDs certificaten blijven gebruiken. Voor federatieve Windows-aanmelding gebruikt u het MEX-eindpunt als metadataExchangeUri en het actieve WS-Trust-eindpunt als activeSignInUri.

Configureer de Immutable ID van de gebruiker

De onPremisesImmutableId van de gebruiker in Microsoft Entra ID moet overeenkomen met de http://schemas.microsoft.com/LiveID/Federation/2008/05/ImmutableID claim uitgegeven door FoxIDs.

Microsoft beschrijft de AD FS Immutable ID-claim in de AD FS-beheer en maatwerk-documentatie.

Configureer de Immutable ID van de gebruiker met PowerShell

  1. Verbinding maken met Microsoft Graph:
    Connect-MgGraph -Scopes "User.ReadWrite.All"
    
  2. Stel de variabelen in:
    $userId = "user-id@your-domain.com"
    $immutableId = "immutable-id"
    
  3. Configureer de Immutable ID van de gebruiker:
    Update-MgUser -UserId $userId -OnPremisesImmutableId $immutableId
    
  4. Valideer de waarde:
    Get-MgUser -UserId $userId | Format-List Id, UserPrincipalName, OnPremisesImmutableId
    

Als de gebruiker al een Immutable ID heeft ingesteld, moet u de gebruiker mogelijk uit het federatieve domein verplaatsen, de Immutable ID bijwerken en de gebruiker vervolgens terugverplaatsen naar het federatieve domein.

Configureer Microsoft Entra ID

Het is niet mogelijk om dit type Microsoft Entra ID-domeinfederatie te configureren in de Microsoft Entra ID-beheercentrum.. Gebruik Microsoft Graph PowerShell of Microsoft Graph API.

De Microsoft Graph internalDomainFederation bron ondersteunt zowel SAML als WS-Federation. Voor WS-Federation stelt u preferredAuthenticationProtocol in op wsFed. Zie de Maak een interneDomainFederation-documentatie van Microsoft.

  1. Open PowerShell als beheerder.

  2. Installeer de Microsoft Grafiek PowerShell-module als deze nog niet is geïnstalleerd:

    Install-Module -Name Microsoft.Graph
    

    Optioneel installeren voor huidige gebruiker:

    Install-Module Microsoft.Graph -Scope CurrentUser -Force
    
  3. Verbinding maken met Microsoft Graph:

    Connect-MgGraph -Scopes "Domain.ReadWrite.All,Directory.AccessAsUser.All"
    
  4. Stel de configuratievariabelen in:

    $domainId = "your-domain.com"
    $displayName = FoxIDs
    $issuerUri = "copied Realm / issuer from FoxIDs"
    $metadataExchangeUri = "copied MEX endpoint from FoxIDs"
    $passiveSignInUri = "copied Passive sign-in URL from FoxIDs"
    $activeSignInUri = "copied Active WS-Trust endpoint from FoxIDs"
    $signOutUri = "copied Sign-out URL from FoxIDs"
    $signingCertificate = "copied IdP signing certificate from FoxIDs"
    
  5. Configureer de domeinfederatie:

    $params = @{
      "@odata.type" = "#microsoft.graph.internalDomainFederation"
      displayName = $displayName
      issuerUri = $issuerUri
      metadataExchangeUri = $metadataExchangeUri
      passiveSignInUri = $passiveSignInUri
      activeSignInUri = $activeSignInUri
      preferredAuthenticationProtocol = "wsFed"
      signOutUri = $signOutUri
      federatedIdpMfaBehavior = "acceptIfMfaDoneByFederatedIdp"
    }
    
    New-MgDomainFederationConfiguration -DomainId $domainId -BodyParameter $params
    

    federatedIdpMfaBehavior kan worden ingesteld op:

    • acceptIfMfaDoneByFederatedIdp - Microsoft Entra ID accepteert MFA van FoxIDs; als FoxIDs geen MFA deden, kan Microsoft Entra ID het wel doen.
    • enforceMfaByFederatedIdp - Als een beleid MFA nodig heeft, stuurt Microsoft Entra ID de gebruiker terug naar FoxIDs om MFA te voltooien.
    • rejectMfaByFederatedIdp - Microsoft Entra ID doet MFA altijd zelf; MFA bij FoxIDs wordt genegeerd.
  6. Valideer de configuratie:

    Get-MgDomainFederationConfiguration -DomainId $domainId | Format-List
    Get-MgDomain -DomainId $domainId | Format-List Id, AuthenticationType
    

Microsoft Entra ID gebruikt passiveSignInUri voor webgebaseerde clients en activeSignInUri voor actieve clients zoals Microsoft Entra aangesloten en Microsoft Entra hybride aangesloten Windows-apparaten. Zie de internalDomainFederation-bron-documentatie van Microsoft voor de volledige lijst met eigenschappen.

If you configure Microsoft Entra ID manually, update the Microsoft Entra ID signingCertificate and nextSigningCertificate values when FoxIDs signing certificates roll over. Automatic federation handles this for you.

Automatische Microsoft Entra ID-sync voor self-hosting configureren

Voor self-hosted FoxIDs-deployments vereist automatische Microsoft Entra ID federation sync een Microsoft Entra ID app registration die is geconfigureerd in zowel de FoxIDs runtime- als FoxIDs Control deploymentconfiguratie. FoxIDs gebruikt de app registration met de client credentials flow om Microsoft Graph aan te roepen en de domein-federationConfiguration te maken of bij te werken.

De app registration moet de Microsoft Graph application permission Domain-InternalFederation.ReadWrite.All hebben. Gebruik bij voorkeur certificate authentication door het openbare certificaat naar de app registration te uploaden en FoxIDs met hetzelfde certificaat inclusief private key te configureren.

Request Microsoft Graph application permission for internal federation configuration

PFX is handig voor deployment-systemen die secrets als waarden op één regel opslaan. Het PFX-wachtwoord is optioneel; laat CertificatePfxPassword weg als de PFX niet met een wachtwoord is beveiligd:

{
  "Settings": {
    "Modules": {
      "MicrosoftEntraIdSync": {
        "ClientId": "<application-client-id>",
        "CertificatePfx": "<base64-encoded-pfx>",
        "CertificatePfxPassword": "<optional-pfx-password>"
      }
    }
  }
}

Als environment variables:

Settings__Modules__MicrosoftEntraIdSync__ClientId=<application-client-id>
Settings__Modules__MicrosoftEntraIdSync__CertificatePfx=<base64-encoded-pfx>
Settings__Modules__MicrosoftEntraIdSync__CertificatePfxPassword=<optional-pfx-password>

Zo maakt u de base64-gecodeerde PFX-waarde van een PFX-certificaat zonder wachtwoord:

$pfxPath = "C:\path\to\certificate.pfx"
$base64Pfx = [Convert]::ToBase64String([IO.File]::ReadAllBytes($pfxPath))
$base64Pfx | Set-Clipboard

PEM-certificaat en private key tekst kunnen ook worden gebruikt:

{
  "Settings": {
    "Modules": {
      "MicrosoftEntraIdSync": {
        "ClientId": "<application-client-id>",
        "CertificatePemCrt": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
        "CertificatePemKey": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
      }
    }
  }
}

Als er geen certificaat is geconfigureerd, gebruikt FoxIDs client secret authentication:

{
  "Settings": {
    "Modules": {
      "MicrosoftEntraIdSync": {
        "ClientId": "<application-client-id>",
        "ClientSecret": "<client-secret>"
      }
    }
  }
}

Als environment variables:

Settings__Modules__MicrosoftEntraIdSync__ClientId=<application-client-id>
Settings__Modules__MicrosoftEntraIdSync__ClientSecret=<client-secret>

Als een certificaat is geconfigureerd, gebruikt FoxIDs altijd certificate authentication en valt het niet terug op ClientSecret als certificate authentication mislukt. Configureer CertificatePfx of zowel CertificatePemCrt als CertificatePemKey; configureer niet zowel PFX- als PEM-certificaatinstellingen.

Uw privacy

Uw privacy

We gebruiken cookies om uw ervaring op onze websites te verbeteren. Klik op de knop 'Alle cookies accepteren' om akkoord te gaan met het gebruik van cookies. Om niet-noodzakelijke cookies te weigeren, klikt u op 'Alleen noodzakelijke cookies'.

Bezoek onze privacyverklaring voor meer informatie