Authentifizierungsprotokolle Authentication Protocols
OAuth 2.0, OpenID Connect, SAML 2.0, WS-Federation, Token-Typen, Claims und moderne vs. Legacy-Authentifizierung im Überblick. OAuth 2.0, OpenID Connect, SAML 2.0, WS-Federation, token types, claims, and modern vs. legacy authentication at a glance.
Modernes Autorisierungs- und Identitätsprotokoll für Web-, Mobile- und API-Szenarien.Modern authorization and identity protocol for web, mobile, and API scenarios.
XML-basiertes Föderationsprotokoll für Enterprise SSO mit älteren Anwendungen.XML-based federation protocol for enterprise SSO with legacy applications.
Älteres Microsoft/ADFS-Protokoll; weiterhin für viele on-premises Apps relevant.Older Microsoft/ADFS protocol; still relevant for many on-premises apps.
ID Token, Access Token, Refresh Token – jeder mit unterschiedlichem Zweck und Lebensdauer.ID token, access token, refresh token – each with different purpose and lifetime.
ÜberblickOverview
Microsoft Entra ID unterstützt eine Vielzahl von Authentifizierungs- und Autorisierungsprotokollen. Moderne Applikationen sollten OAuth 2.0 mit OpenID Connect nutzen, da diese Protokolle auf MFA, Conditional Access und moderne Token-Verwaltung ausgelegt sind. Legacy-Protokolle wie NTLM, Kerberos (nur on-prem), SMTP AUTH oder IMAP umgehen Conditional Access und sollten blockiert werden. Microsoft Entra ID supports a wide range of authentication and authorization protocols. Modern applications should use OAuth 2.0 with OpenID Connect since these protocols are designed for MFA, Conditional Access, and modern token management. Legacy protocols like NTLM, Kerberos (on-prem only), SMTP AUTH, or IMAP bypass Conditional Access and should be blocked.
Anmeldungen über Legacy-Auth-Protokolle (SMTP AUTH, POP, IMAP, Basic Auth gegen Exchange oder SharePoint) können nicht durch MFA oder Conditional Access geschützt werden. Erstellen Sie eine CA-Policy, die alle Legacy-Clients blockiert, bevor Sie Security Defaults deaktivieren. Sign-ins via legacy auth protocols (SMTP AUTH, POP, IMAP, Basic Auth against Exchange or SharePoint) cannot be protected by MFA or Conditional Access. Create a CA policy that blocks all legacy clients before disabling Security Defaults.
OAuth 2.0 – GrundprinzipOAuth 2.0 – Core principle
OAuth 2.0 ist ein Autorisierungsframework, das einer Anwendung (Client) erlaubt, im Namen eines Benutzers oder als eigene Identität auf geschützte Ressourcen zuzugreifen, ohne das Passwort des Benutzers zu kennen. Entra ID ist dabei der Authorization Server. OAuth 2.0 is an authorization framework that allows an application (client) to access protected resources on behalf of a user or as its own identity, without knowing the user's password. Entra ID acts as the Authorization Server.
| RolleRole | Entra ID-EntsprechungEntra ID equivalent | AufgabeTask |
|---|---|---|
| Resource OwnerResource Owner | Benutzer oder ServiceUser or service | Gibt Zugriff auf eigene Ressourcen freiGrants access to own resources |
| ClientClient | App-Registrierung / Service PrincipalApp registration / Service Principal | Fordert Token an, greift auf Ressource zuRequests tokens, accesses resource |
| Authorization ServerAuthorization Server | Microsoft Entra IDMicrosoft Entra ID | Authentifiziert, prüft CA, stellt Token ausAuthenticates, checks CA, issues tokens |
| Resource ServerResource Server | Microsoft Graph, eigene API, Azure ResourceMicrosoft Graph, own API, Azure resource | Nimmt Access Token entgegen, prüft AnsprücheAccepts access token, validates claims |
OAuth 2.0 Grant Types (Flows)OAuth 2.0 Grant types (flows)
| FlowFlow | EinsatzUse case | SicherheitSecurity |
|---|---|---|
| Authorization Code + PKCEAuthorization Code + PKCE | Öffentliche Clients (SPA, Mobile, Desktop)Public clients (SPA, mobile, desktop) | Empfohlen; PKCE verhindert Code InjectionRecommended; PKCE prevents code injection |
| Authorization Code (confidential)Authorization Code (confidential) | Web-Apps mit Back-End-ServerWeb apps with back-end server | Client Secret oder Certificate sichert den TauschClient secret or certificate secures the exchange |
| Client CredentialsClient Credentials | Daemon-Apps, Background Services, no userDaemon apps, background services, no user | Certificate bevorzugen gegenüber Client SecretPrefer certificate over client secret |
| On-Behalf-Of (OBO)On-Behalf-Of (OBO) | Middle-Tier-APIs, die im Benutzerkontext weiteragierenMiddle-tier APIs acting in user context | Delegiertes Zugriffstoken mit BenutzercontextDelegated access token preserving user context |
| Device CodeDevice Code | Geräte ohne Browser (IoT, Headless CLI)Devices without browser (IoT, headless CLI) | Benutzer autorisiert auf separatem GerätUser authorizes on a separate device |
| Implicit (Legacy)Implicit (Legacy) | Veraltet; früher für SPAsDeprecated; formerly used for SPAs | Nicht mehr empfohlen; durch Auth Code + PKCE ersetzenNo longer recommended; replace with Auth Code + PKCE |
| Resource Owner Password Credentials (ROPC)Resource Owner Password Credentials (ROPC) | Nur absoluter Notfall (Migration, Legacy)Absolute emergency only (migration, legacy) | Kein MFA, kein CA – stark risikoreichNo MFA, no CA – highly risky |
Authorization Code Flow mit PKCE – SchrittübersichtAuthorization Code Flow with PKCE – step overview
PKCE (Proof Key for Code Exchange) ist ein Erweiterungsmechanismus für den Authorization Code Flow, der für öffentliche Clients (kein sicheres Client Secret möglich) obligatorisch sein sollte. PKCE (Proof Key for Code Exchange) is an extension mechanism for the Authorization Code Flow that should be mandatory for public clients (no secure client secret possible).
| ## | SchrittStep | AkteurActor | BeschreibungDescription |
|---|---|---|---|
| 11 | Code Verifier / Challenge erzeugenCode Verifier / Challenge erzeugen | ClientClient | Zufälliger Code Verifier; SHA-256 als Code ChallengeRandom code verifier; SHA-256 as code challenge |
| 22 | Authorization RequestAuthorization Request | Client → Entra IDClient → Entra ID | Redirect zur /authorize-Endpoint mit code_challengeRedirect to /authorize endpoint with code_challenge |
| 33 | Authentifizierung + CAAuthentifizierung + CA | Benutzer + Entra IDBenutzer + Entra ID | Benutzer meldet sich an, CA-Policies werden ausgewertetUser signs in, CA policies are evaluated |
| 44 | Authorization CodeAuthorization Code | Entra ID → ClientEntra ID → Client | Kurzlebiger Code per Redirect URI an ClientShort-lived code via redirect URI to client |
| 55 | Token RequestToken Request | Client → Entra IDClient → Entra ID | Code + code_verifier gegen Tokens tauschenExchange code + code_verifier for tokens |
| 66 | Tokens empfangenTokens empfangen | ClientClient | ID Token, Access Token, Refresh TokenID token, access token, refresh token |
GET https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize
?client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
&response_type=code
&redirect_uri=https%3A%2F%2Fapp.contoso.com%2Fcallback
&scope=openid%20profile%20email%20https%3A%2F%2Fgraph.microsoft.com%2FUser.Read
&state=12345
&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
&code_challenge_method=S256
POST https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded
client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
&grant_type=authorization_code
&code=OAAABAAAAiL...
&redirect_uri=https%3A%2F%2Fapp.contoso.com%2Fcallback
&code_verifier=dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
OpenID Connect (OIDC)OpenID Connect (OIDC)
OpenID Connect ist eine Identitätsschicht auf OAuth 2.0. Es fügt das ID Token hinzu, das den authentifizierten Benutzer beschreibt. OIDC ist der empfohlene Standard für modernes Single Sign-On. OpenID Connect is an identity layer on top of OAuth 2.0. It adds the ID Token describing the authenticated user. OIDC is the recommended standard for modern Single Sign-On.
| OIDC EndpointOIDC Endpoint | ZweckPurpose | URL-MusterURL-Muster |
|---|---|---|
| AuthorizationAuthorization | Benutzeranmeldung einleitenInitiate user sign-in | /{tenant}/oauth2/v2.0/authorize |
| TokenToken | Token anfordernRequest tokens | /{tenant}/oauth2/v2.0/token |
| UserInfoUserInfo | Benutzerprofilinfos abrufenRetrieve user profile info | /oidc/userinfo |
| LogoutLogout | Session beendenEnd session | /{tenant}/oauth2/v2.0/logout |
| Discovery (JWKS)Discovery (JWKS) | Public Keys für Token-ValidierungPublic keys for token validation | /{tenant}/discovery/v2.0/keys |
| OpenID ConfigurationOpenID Configuration | Metadata-DokumentMetadata document | /{tenant}/.well-known/openid-configuration |
Standard-Scopes (OIDC)Standard scopes (OIDC)
| ScopeScope | Claims im ID TokenClaims in ID token |
|---|---|
| openidopenid | sub, iss, aud, exp, iat, tidsub, iss, aud, exp, iat, tid |
| profileprofile | name, family_name, given_name, preferred_username, oidname, family_name, given_name, preferred_username, oid |
| emailemail | email, email_verifiedemail, email_verified |
| addressaddress | Adressclaims (selten genutzt in Entra)Address claims (rarely used in Entra) |
| offline_accessoffline_access | Kein Claim, aber Refresh Token im ResponseNo claim, but refresh token in response |
Token-TypenToken types
| TokenToken | FormatFormat | ZweckPurpose | Lebensdauer (Standard)Lifetime (default) |
|---|---|---|---|
| ID TokenID Token | JWT (signed)JWT (signed) | Wer ist der Benutzer? (Identitätsnachweis für die App)Who is the user? (identity proof for the app) | 1 Stunde / 1 hour1 Stunde / 1 hour |
| Access TokenAccess Token | JWT (signed/opaque)JWT (signed/opaque) | Autorisierung gegenüber einer API/RessourceAuthorization to an API/resource | 1 Stunde / 1 hour1 Stunde / 1 hour |
| Refresh TokenRefresh Token | Opaque (nicht lesbar)Opaque (not readable) | Neue Access Tokens anfordern ohne Re-AuthentifizierungRequest new access tokens without re-authentication | 24h (SFT) / 90 Tage rolling24h (SFT) / 90 Tage rolling |
| Primary Refresh Token (PRT)Primary Refresh Token (PRT) | Opaque, gerätegebundenOpaque, device-bound | SSO auf verwalteten Windows-GerätenSSO on managed Windows devices | 14 Tage rolling14 Tage rolling |
Wichtige Claims im Access TokenKey claims in access token
| ClaimClaim | BedeutungMeaning | BeispielwertExample value |
|---|---|---|
| ississ | Aussteller (Entra Tenant)Issuer (Entra tenant) | https://login.microsoftonline.com/{tid}/v2.0https://login.microsoftonline.com/{tid}/v2.0 |
| audaud | Zielressource (Client-ID oder App-URI)Target resource (client ID or app URI) | api://myapi oder 00000003-0000-0000-c000-000000000000api://myapi oder 00000003-0000-0000-c000-000000000000 |
| oidoid | Benutzer-Objekt-ID in EntraUser object ID in Entra | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| scpscp | Delegierte Scopes (user context)Delegated scopes (user context) | User.Read Mail.SendUser.Read Mail.Send |
| rolesroles | App-Roles (app context)App roles (app context) | Reports.Read.All DataExporterReports.Read.All DataExporter |
| tidtid | Tenant-IDTenant ID | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| upnupn | UserPrincipalName des BenutzersUserPrincipalName of the user | user@contoso.comuser@contoso.com |
| expexp | Ablaufzeit (Unix epoch)Expiry time (Unix epoch) | 17000000001700000000 |
| amramr | Authentication Method ReferenceAuthentication Method Reference | ["pwd","mfa","ngcmfa"]["pwd","mfa","ngcmfa"] |
| acracr | Authentication Context Class ReferenceAuthentication Context Class Reference | c1 (mit Step-Up-Auth)c1 (mit Step-Up-Auth) |
SAML 2.0SAML 2.0
SAML 2.0 (Security Assertion Markup Language) ist ein XML-basiertes Protokoll für die Föderierung von Identitäten zwischen Identity Provider (IdP) und Service Provider (SP). Entra ID kann sowohl als IdP als auch als SP fungieren. SAML 2.0 (Security Assertion Markup Language) is an XML-based protocol for federating identities between an Identity Provider (IdP) and a Service Provider (SP). Entra ID can act as both IdP and SP.
| Entra alsEntra as | SzenarioScenario | KonfigurationConfiguration |
|---|---|---|
| Identity Provider (IdP)Identity Provider (IdP) | SSO für SAML-fähige Enterprise Apps (z. B. Salesforce, ServiceNow)SSO for SAML-capable enterprise apps (e.g. Salesforce, ServiceNow) | Enterprise App → SAML SSO → SP-Metadaten importierenEnterprise App → SAML SSO → import SP metadata |
| Service Provider (SP)Service Provider (SP) | Föderierung mit externem IdP (ADFS, Ping, Okta)Federation with external IdP (ADFS, Ping, Okta) | Direct Federation oder SAML IdP in External IdentitiesDirect Federation or SAML IdP in External Identities |
SAML Assertion-Strukturassertion structure
<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
Destination="https://app.contoso.com/acs">
<saml:Issuer>https://sts.windows.net/{tenant-id}/</saml:Issuer>
<samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status>
<saml:Assertion>
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">
user@contoso.com
</saml:NameID>
</saml:Subject>
<saml:AttributeStatement>
<saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name">
<saml:AttributeValue>user@contoso.com</saml:AttributeValue>
</saml:Attribute>
</saml:AttributeStatement>
</saml:Assertion>
</samlp:Response>
| SAML-ClaimSAML claim | Entra-QuelleEntra source |
|---|---|
| NameID (emailAddress)NameID (emailAddress) | user.mail oder user.userprincipalnameuser.mail oder user.userprincipalname |
| givennamegivenname | user.givennameuser.givenname |
| surnamesurname | user.surnameuser.surname |
| groupsgroups | Gruppenobjekt-IDs oder sAMAccountName (konfigurierbar)Group object IDs or sAMAccountName (configurable) |
| rolesroles | App-Rollen der Enterprise AppApp roles of the Enterprise App |
WS-FederationWS-Federation
WS-Federation ist ein älteres Microsoft-Protokoll, das hauptsächlich von ADFS und Windows-basierten Applikationen genutzt wird. Entra ID unterstützt WS-Fed für Enterprise SSO-Szenarien, insbesondere bei der Migration von ADFS. WS-Federation is an older Microsoft protocol mainly used by ADFS and Windows-based applications. Entra ID supports WS-Fed for enterprise SSO scenarios, especially during ADFS migration.
| EndpunktEndpoint | URLURL |
|---|---|
| WS-Fed Sign-OnWS-Fed Sign-On | https://login.microsoftonline.com/{tenant}/wsfedhttps://login.microsoftonline.com/{tenant}/wsfed |
| WS-Fed MetadataWS-Fed Metadata | https://login.microsoftonline.com/{tenant}/federationmetadata/2007-06/federationmetadata.xmlhttps://login.microsoftonline.com/{tenant}/federationmetadata/2007-06/federationmetadata.xml |
Legacy-AuthentifizierungLegacy authentication
Legacy-Protokolle wie SMTP AUTH, POP, IMAP, Basic Auth und NTLM können keine modernen Sicherheitskontrollen (MFA, CA) nutzen. Sie stellen ein erhöhtes Angriffsziel (Password Spray, Brute Force) dar. Legacy protocols like SMTP AUTH, POP, IMAP, Basic Auth, and NTLM cannot use modern security controls (MFA, CA). They present an elevated attack target (password spray, brute force).
| ProtokollProtocol | CA-Bedingung in EntraCA condition in Entra | EmpfehlungRecommendation |
|---|---|---|
| SMTP AUTHSMTP AUTH | Other clientsOther clients | Blockieren; OAuth2 für SMTP nutzenBlock; use OAuth2 for SMTP |
| IMAP / POPIMAP / POP | Other clientsOther clients | Blockieren; moderne Mail-Clients erzwingenBlock; enforce modern mail clients |
| Exchange ActiveSync (EAS)Exchange ActiveSync (EAS) | Exchange ActiveSyncExchange ActiveSync | Separate Policy mit App-Protection-AnforderungSeparate policy with app protection requirement |
| Basic Auth RESTBasic Auth REST | Other clientsOther clients | Vollständig deaktiviert in Exchange Online seit 2022Fully disabled in Exchange Online since 2022 |
| NTLM (on-prem)NTLM (on-prem) | Kein Entra-SignalNo Entra signal | Entra Private Access für moderne AblösungEntra Private Access for modern replacement |
Connect-MgGraph -Scopes "AuditLog.Read.All"
$legacyClients = @("Exchange ActiveSync","IMAP","POP","SMTP","Authenticated SMTP","Other clients")
$since = (Get-Date).AddDays(-30).ToString("o")
$logs = Get-MgAuditLogSignIn -Filter "createdDateTime ge $since" -All |
Where-Object { $_.ClientAppUsed -in $legacyClients }
$logs | Group-Object UserPrincipalName, ClientAppUsed |
Select-Object Count, Name | Sort-Object Count -Descending
Claims-TransformationenClaims transformations
Für SAML und OIDC können Claims per Claim Mapping Policy oder über optionale Claims angepasst werden. Dies ist wichtig, wenn Anwendungen bestimmte Attributnamen oder -formate erwarten. For SAML and OIDC, claims can be customized via Claim Mapping Policy or optional claims. This is important when applications expect specific attribute names or formats.
{
"optionalClaims": {
"idToken": [
{ "name": "upn", "essential": false },
{ "name": "email", "essential": false },
{ "name": "family_name", "essential": false }
],
"accessToken": [
{ "name": "groups", "essential": false, "additionalProperties": ["sam_account_name"] },
{ "name": "wids", "essential": false }
],
"saml2Token": [
{ "name": "upn", "essential": false }
]
}
}
Continuous Access Evaluation (CAE)Continuous Access Evaluation (CAE)
CAE ermöglicht es Entra ID, Access Tokens vorzeitig zu widerrufen, ohne auf den normalen Token-Ablauf warten zu müssen. Ressourcenserver (Exchange Online, SharePoint, Teams, Microsoft Graph) registrieren sich als CAE-fähig und erhalten Push-Benachrichtigungen bei kritischen Ereignissen. CAE enables Entra ID to revoke access tokens prematurely without waiting for the normal token expiry. Resource servers (Exchange Online, SharePoint, Teams, Microsoft Graph) register as CAE-capable and receive push notifications on critical events.
| Auslösendes EreignisTriggering event | VerhaltenBehavior |
|---|---|
| Benutzer deaktiviertUser disabled | Token sofort widerrufenToken revoked immediately |
| Passwort geändert/zurückgesetztPassword changed/reset | Token innerhalb von Minuten widerrufenToken revoked within minutes |
| Hohes BenutzerrisikoHigh user risk | CA-Richtlinien erneut erzwungenCA policies re-enforced |
| IP-Standortänderung (Netzwerkbedingung)IP location change (network condition) | Neues Token außerhalb des Named Location erfordert Re-AuthNew token outside named location requires re-auth |
CAE ist für Microsoft 365-Ressourcen standardmäßig aktiviert. Aktivieren Sie CAE für eigene APIs durch Überprüfung des xms_cc-Claims im Access Token und Implementierung des 401 + WWW-Authenticate-Challenge-Musters.
CAE is enabled by default for Microsoft 365 resources. Enable CAE for your own APIs by checking the xms_cc claim in the access token and implementing the 401 + WWW-Authenticate challenge pattern.
Token-Lifetime-KonfigurationToken lifetime configuration
Die Lebensdauer von Tokens kann über Token Lifetime Policies angepasst werden. Für moderne Apps empfiehlt Microsoft, die Standard-Lebensdauern beizubehalten und stattdessen Session Controls in CA zu nutzen. Token Lifetime Policies sind primär für SAML-Szenarien oder spezielle Legacy-Anforderungen relevant. The lifetime of tokens can be customized via Token Lifetime Policies. For modern apps Microsoft recommends keeping the default lifetimes and instead using Session Controls in CA. Token Lifetime Policies are primarily relevant for SAML scenarios or special legacy requirements.
Connect-MgGraph -Scopes "Policy.ReadWrite.ApplicationConfiguration"
$policyDef = @{
definition = @(
'{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"01:00:00","MaxInactiveTime":"30.00:00:00","MaxAgeSingleFactor":"until-revoked","MaxAgeMultiFactor":"until-revoked"}}'
)
displayName = "Custom Token Lifetime"
isOrganizationDefault = $false
}
$policy = New-MgPolicyTokenLifetimePolicy -BodyParameter $policyDef
# Policy einer App-Registrierung zuweisen
New-MgApplicationTokenLifetimePolicyByRef -ApplicationId "<appObjectId>" `
-OdataId "https://graph.microsoft.com/v1.0/policies/tokenLifetimePolicies/$($policy.Id)"
SAML-DebuggingSAML debugging
Für die Fehlersuche in SAML-Szenarien sind der SAML Token Decoder (browser-seitig) und das Entra-Anmeldeprotokoll die wichtigsten Werkzeuge. Die häufigsten SAML-Fehler sind ungültige Reply URLs, fehlende Claims und Zertifikatsablauf. For troubleshooting SAML scenarios, the SAML token decoder (browser-side) and the Entra sign-in log are the most important tools. The most common SAML errors are invalid reply URLs, missing claims, and certificate expiry.
| FehlerError | UrsacheCause | LösungSolution |
|---|---|---|
| AADSTS50105AADSTS50105 | Benutzer nicht der Enterprise App zugewiesenUser not assigned to the Enterprise App | User Assignment aktivieren und Benutzer/Gruppe zuweisenEnable user assignment and assign user/group |
| AADSTS75011AADSTS75011 | Authentifizierungsmethode stimmt nicht übereinAuthentication method mismatch | RequestedAuthnContext in SAML-Anfrage prüfenCheck RequestedAuthnContext in SAML request |
| AADSTS650056AADSTS650056 | Fehlende Admin Consent für benötigte ScopesMissing admin consent for required scopes | Admin Consent im Enterprise App Grant erteilenGrant admin consent in Enterprise App grant |
| Zertifikat abgelaufenZertifikat abgelaufen | SAML-Signaturzertifikat der Enterprise App abgelaufenSAML signing certificate of the Enterprise App expired | Neues Zertifikat generieren und SP-Seite aktualisierenGenerate new certificate and update SP side |
Workload-Identitäten und ProtokolleWorkload identities and protocols
Workload-Identitäten (Service Principals, Managed Identities) nutzen ausschließlich den Client Credentials Flow oder Federated Identity Credentials. Für maximale Sicherheit sollten Zertifikate statt Client Secrets und Federated Identity Credentials (Workload Identity Federation) verwendet werden. Workload identities (service principals, managed identities) exclusively use the Client Credentials Flow or Federated Identity Credentials. For maximum security, certificates instead of client secrets and Federated Identity Credentials (Workload Identity Federation) should be used.
| MethodeMethod | SicherheitSecurity | EinsatzUse case |
|---|---|---|
| Client SecretClient Secret | Niedrig – gespeichert, rotierbarLow – stored, rotatable | Nur für Tests; niemals in ProduktionTests only; never production |
| CertificateCertificate | Hoch – privater Schlüssel nie übertragenHigh – private key never transmitted | Produktive Service-AccountsProduction service accounts |
| Federated Identity (OIDC)Federated Identity (OIDC) | Sehr hoch – kein gespeichertes GeheimnisVery high – no stored secret | GitHub Actions, Azure DevOps, KubernetesGitHub Actions, Azure DevOps, Kubernetes |
| Managed IdentityManaged Identity | Sehr hoch – keine AnmeldedatenverwaltungVery high – no credential management | Azure-gehostete WorkloadsAzure-hosted workloads |
Token-ValidierungToken validation
Ressourcenserver müssen eingegangene Access Tokens validieren. Die Validierung umfasst die Signaturprüfung (JWKS), Aussteller-Überprüfung, Zielgruppen-Check (aud-Claim) und Ablaufzeit-Validierung.
Resource servers must validate incoming access tokens. Validation includes signature verification (JWKS), issuer check, audience check (aud claim), and expiry validation.
| ValidierungsschrittValidation step | BeschreibungDescription | Claim / EndpunktClaim / endpoint |
|---|---|---|
| SignaturSignature | RS256-Signatur gegen JWKS-URI prüfenVerify RS256 signature against JWKS URI | jwks_uri aus OpenID Configurationjwks_uri aus OpenID Configuration |
| AusstellerIssuer | iss-Claim mit Tenant-ID oder Common-Issuer vergleichenCompare iss claim with tenant ID or common issuer | ississ |
| ZielgruppeAudience | aud-Claim muss App-ID der eigenen Ressource enthaltenaud claim must contain the app ID of the resource | audaud |
| AblaufzeitExpiry | exp-Claim darf nicht in der Vergangenheit liegenexp claim must not be in the past | exp, nbfexp, nbf |
| Scopes / RollenScopes / roles | Erforderliche Berechtigungen im scp oder roles-Claim prüfenCheck required permissions in scp or roles claim | scp, rolesscp, roles |
Microsoft Identity EndpointsMicrosoft identity endpoints
Microsoft Entra ID stellt mehrere Endpoints für verschiedene Protokolle bereit. Die wichtigsten Basis-URLs sind die v2.0-Endpoints (empfohlen) und der v1.0-Endpoint (Legacy).
Microsoft Entra ID provides several endpoints for different protocols. The main base URLs are the v2.0 endpoints (recommended) and the v1.0 endpoint (legacy).
| EndpunktEndpoint | URLURL | VerwendungUsage |
|---|---|---|
| AutorisierungAuthorization | https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorizehttps://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize | OAuth 2.0, OIDCOAuth 2.0, OIDC |
| TokenToken | https://login.microsoftonline.com/{tenant}/oauth2/v2.0/tokenhttps://login.microsoftonline.com/{tenant}/oauth2/v2.0/token | OAuth 2.0, OIDCOAuth 2.0, OIDC |
| OpenID ConfigurationOpenID Configuration | https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configurationhttps://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration | OIDC DiscoveryOIDC Discovery |
| JWKSJWKS | https://login.microsoftonline.com/{tenant}/discovery/v2.0/keyshttps://login.microsoftonline.com/{tenant}/discovery/v2.0/keys | SignaturschlüsselSigning keys |
| SAML Sign-InSAML Sign-In | https://login.microsoftonline.com/{tenant}/saml2https://login.microsoftonline.com/{tenant}/saml2 | SAML 2.0SAML 2.0 |
| SAML Sign-OutSAML Sign-Out | https://login.microsoftonline.com/{tenant}/saml2https://login.microsoftonline.com/{tenant}/saml2 | SAML SLOSAML SLO |
| WS-FederationWS-Federation | https://login.microsoftonline.com/{tenant}/wsfedhttps://login.microsoftonline.com/{tenant}/wsfed | WS-FedWS-Fed |
| UserInfoUserInfo | https://graph.microsoft.com/oidc/userinfohttps://graph.microsoft.com/oidc/userinfo | OIDC UserInfoOIDC UserInfo |
Zertifikate und SchlüsselCertificates and keys
Microsoft Entra ID verwendet RSA-Schlüssel zum Signieren von Tokens. Die öffentlichen Schlüssel werden über den JWKS-Endpunkt bereitgestellt und regelmäßig rotiert. Anwendungen sollten Schlüssel dynamisch abrufen und cachen. Microsoft Entra ID uses RSA keys to sign tokens. The public keys are provided via the JWKS endpoint and regularly rotated. Applications should dynamically retrieve and cache keys.
| AspektAspect | DetailDetail |
|---|---|
| AlgorithmusAlgorithm | RS256 (RSA + SHA-256)RS256 (RSA + SHA-256) |
| SchlüssellängeKey size | 2048 Bit2048 Bit |
| RotationRotation | Alle 6 Wochen (automatisch); Notfall-Rotation möglichEvery 6 weeks (automatic); emergency rotation possible |
| JWKS-CachingJWKS caching | 24 Stunden empfohlen; bei 401-Fehler sofort neu laden24 hours recommended; reload immediately on 401 error |
| SAML-ZertifikatSAML certificate | 3 Jahre Standard; verlängerbar per Portal oder PowerShell3 years default; renewable via portal or PowerShell |
Ein abgelaufenes SAML-Signaturzertifikat führt zu sofortigem SSO-Ausfall. Richten Sie Alerting für Zertifikatsabläufe über Entra-Empfehlungen oder Monitoring-Scripts ein. An expired SAML signing certificate causes immediate SSO failure. Set up alerting for certificate expiry via Entra recommendations or monitoring scripts.