Koble til Microsoft Entra ID med WS-Federation

Bruk FoxIDs som en WS-Federation Security Token Service (STS) for et forent Microsoft Entra ID-domene og forent Windows-pålogging.

FoxIDs kan brukes som den fødererte identitetsleverandøren for Microsoft Entra joined og Microsoft Entra hybrid joined Windows-enheter.

I et forent miljø krever Microsoft Entra ID WS-Federation og WS-Trust-støtte for Windows-pålogging. FoxIDs avslører WS-Federation-metadata, MEX-endepunkt og aktive WS-Trust UsernameMixed-endepunkt som kreves av disse Microsoft Entra ID- og Windows-flytene. FoxIDs blir ikke med eller registrerer enheter; enhetsregistrering håndteres av Microsoft Entra ID og Windows.

Organisasjoner som bruker AD FS for Microsoft Entra ID-domeneføderasjon kan bruke FoxIDs for rollen som forent identitetsleverandør beskrevet i denne veiledningen.

Konfigurer FoxIDs

Denne veiledningen beskriver hvordan du konfigurerer FoxIDs som STS for et forent Microsoft Entra ID-domene. Brukere er koblet til Microsoft Entra ID-brukere med deres 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. Velg fanen Programmer.
  2. Klikk på Ny applikasjon.
  3. Klikk på Vis alle alternativer.
  4. Klikk på Nettapplikasjon med WS-Federation-merket.
  5. Legg til Navn, f.eks. Microsoft Entra ID.
  6. Velg manuell konfigurasjon.
  7. Sett Application realm til urn:federation:MicrosoftOnline.
  8. Angi Svar-URL til https://login.microsoftonline.com/login.srf.
  9. Angi Avloggings-URL til https://login.microsoftonline.com/login.srf.
  10. Behold Tokentype som SAML 1.1 med mindre Microsoft Entra ID er konfigurert for en annen tokentype.
  11. Klikk på Opprett.
  12. Åpne programmet og aktiver Microsoft Entra ID Windows-pålogging under de avanserte WS-Federation-innstillingene.

Manual Immutable ID claim transform

Microsoft Entra ID forventer et Immutable ID-claims i WS-Federation-tokenet. Claimsverdien må samsvare med brukerens onPremisesImmutableId i Microsoft Entra ID.

  1. Klikk på Endre applikasjon for å åpne applikasjonen i redigeringsmodus.
  2. Velg fanen Krev transformasjoner.
  3. Klikk på Legg til claimstransformasjon og klikk på Kart.
  4. Sett Nytt claims til http://schemas.microsoft.com/LiveID/Federation/2008/05/ImmutableID.
  5. Sett Velg claims til http://schemas.foxids.com/ws/identity/claims/immutableid.
  6. Klikk på Oppdater.

Microsoft Entra ID-dokumentasjonen oppgir UPN-claimet som en del av det forventede WS-Federation-tokenclaimsettet. FoxIDs utsteder:

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

fra brukerens upn claim. Brukermatching baseres normalt på Immutable ID, men UPN-claimet holder tokenet i samsvar med Microsofts forventede WS-Federation-claimsett.

Du må angi brukerens Immutable ID som et claims i FoxIDs. For å angi Immutable ID på en intern bruker, velg fanen Brukere og deretter fanen Interne brukere, finn brukeren og legg til et claims med claimstypen immutable_id og verdien av den Immutable IDen i Microsoft Entra ID. Den skal være base64-kodet. immutable_id-claimstypen er tilordnet SAML-claimset URI http://schemas.foxids.com/ws/identity/claims/immutableid i FoxIDs. For å utstede UPN-claimet for en intern bruker, legg til et claim med claimtypen upn og brukerens Microsoft Entra ID user principal name, for eksempel user@your-domain.com. FoxIDs mapper det interne upn claimet til http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn.

Manual Microsoft Entra ID federation values

Åpne WS-Federation-applikasjonsregistreringen og kopier verdiene som trengs for Microsoft Entra ID-domeneføderasjon:

  • Federasjonsmetadata
  • Riket / utsteder
  • Passiv påloggingsnettadresse
  • Avloggingsadresse
  • MEX-endepunkt
  • Aktivt WS-Trust-endepunkt

Microsoft Entra ID leser FoxIDs signeringssertifikater fra Federation Metadata URL. Derfor kan du fortsette å bruke standard rullende FoxIDs sertifikater. For føderert Windows-pålogging, bruk MEX-endepunktet som metadataExchangeUri og det aktive WS-Trust-endepunktet som activeSignInUri.

Konfigurer brukerens Immutable ID

Brukerens onPremisesImmutableId i Microsoft Entra ID må samsvare med http://schemas.microsoft.com/LiveID/Federation/2008/05/ImmutableID-claimset utstedt av FoxIDs.

Microsoft beskriver AD FS Immutable ID-claimset i AD FS administrasjon og tilpasning-dokumentasjonen.

Konfigurer brukerens Immutable ID med PowerShell

  1. Koble til Microsoft Graph:
    Connect-MgGraph -Scopes "User.ReadWrite.All"
    
  2. Sett opp variablene:
    $userId = "user-id@your-domain.com"
    $immutableId = "immutable-id"
    
  3. Konfigurer brukerens Immutable ID:
    Update-MgUser -UserId $userId -OnPremisesImmutableId $immutableId
    
  4. Bekreft verdien:
    Get-MgUser -UserId $userId | Format-List Id, UserPrincipalName, OnPremisesImmutableId
    

Hvis brukeren allerede har en Immutable ID-sett, må du kanskje flytte brukeren bort fra det forente domenet, oppdatere den Immutable IDen og deretter flytte brukeren tilbake til det forente domenet.

Konfigurer Microsoft Entra ID

Det er ikke mulig å konfigurere denne typen Microsoft Entra ID-domeneføderasjon i Microsoft Entra ID administrasjonssenter. Bruk Microsoft Graph PowerShell eller Microsoft Graph API.

Microsoft Graph internalDomainFederation-ressursen støtter både SAML og WS-Federation. For WS-Federation, sett preferredAuthenticationProtocol til wsFed. Se Microsofts Opprett internDomainFederation-dokumentasjon.

  1. Åpne PowerShell som administrator.

  2. Installer Microsoft Graph PowerShell-modulen hvis den ikke allerede er installert:

    Install-Module -Name Microsoft.Graph
    

    Eventuelt installer for gjeldende bruker:

    Install-Module Microsoft.Graph -Scope CurrentUser -Force
    
  3. Koble til Microsoft Graph:

    Connect-MgGraph -Scopes "Domain.ReadWrite.All,Directory.AccessAsUser.All"
    
  4. Sett opp konfigurasjonsvariablene:

    $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. Konfigurer domeneføderasjonen:

    $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 settes til:

    • acceptIfMfaDoneByFederatedIdp - Microsoft Entra ID godtar MFA fra FoxIDs; hvis FoxIDs ikke gjorde MFA, kan Microsoft Entra ID gjøre det.
    • enforceMfaByFederatedIdp – Hvis en policy trenger MFA, sender Microsoft Entra ID brukeren tilbake til FoxIDs for å fullføre MFA.
    • rejectMfaByFederatedIdp - Microsoft Entra ID gjør alltid MFA selv; MFA ved FoxIDs ignoreres.
  6. Bekreft konfigurasjonen:

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

Microsoft Entra ID bruker passiveSignInUri for nettbaserte klienter og activeSignInUri for aktive klienter som Microsoft Entra joined og Microsoft Entra hybrid joined Windows-enheter. Se Microsofts internDomainFederation-ressurs-dokumentasjon for hele eiendomslisten.

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.

Konfigurer automatisk Microsoft Entra ID-sync for self-hosting

For self-hostede FoxIDs-deployments krever automatisk Microsoft Entra ID federation sync en Microsoft Entra ID app registration som er konfigurert i både FoxIDs runtime- og FoxIDs Control deployment-konfigurasjonen. FoxIDs bruker app registrationen med client credentials flowet til å kalle Microsoft Graph og opprette eller oppdatere domenets federationConfiguration.

App registrationen må ha Microsoft Graph application permission Domain-InternalFederation.ReadWrite.All. Foretrekk certificate authentication ved å laste opp det offentlige sertifikatet til app registrationen og konfigurere FoxIDs med samme sertifikat inkludert privat nøkkel.

Request Microsoft Graph application permission for internal federation configuration

PFX er praktisk for deployment-systemer som lagrer secrets som enkeltlinjeverdier. PFX-passordet er valgfritt; utelat CertificatePfxPassword hvis PFX-en ikke er passordbeskyttet:

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

Som environment variables:

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

Slik oppretter du den base64-kodede PFX-verdien fra et PFX-sertifikat uten passord:

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

PEM-sertifikat og private key tekst kan også brukes:

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

Hvis det ikke er konfigurert et sertifikat, bruker FoxIDs client secret authentication:

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

Som environment variables:

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

Hvis et sertifikat er konfigurert, bruker FoxIDs alltid certificate authentication og faller ikke tilbake til ClientSecret hvis certificate authentication feiler. Konfigurer enten CertificatePfx eller både CertificatePemCrt og CertificatePemKey; ikke konfigurer både PFX- og PEM-sertifikatinnstillinger.

Ditt personvern

Ditt personvern

Vi bruker cookies for å gjøre opplevelsen av nettstedene våre bedre. Klikk på 'Godta alle cookies' for å samtykke til bruk av cookies. For å reservere deg mot ikke-nødvendige cookies, klikk på 'Kun nødvendige cookies'.

Besøk vår personvernerklæring for mer