You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***emailAddress**:theuser's email address. Human-readable and easy to work with, but it exposes personally identifiable information (PII) and couples the identifier to a value that can change.
119
119
120
-
MismatchedNameIDformatexpectationsbetweenanIdPandanSPareacommonsourceofSSOfailures. InIdentityServer, youconfigurethesupportedformatsgloballyvia `SamlOptions.SupportedNameIdFormats` andsetaper-SPdefaultvia `SamlServiceProvider.DefaultNameIdFormat`. Foremail-formatNameIDs, thesourceclaimiscontrolledby `SamlOptions.EmailNameIdClaimType`.ForcustompersistentNameIDgeneration, implement [`ISamlNameIdGenerator`](/identityserver/saml/extensibility.md#isamlnameidgenerator). See [SamlOptions](/identityserver/saml/configuration.md#samloptions) for the full configuration reference.
Copy file name to clipboardExpand all lines: astro/src/content/docs/identityserver/saml/configuration.md
+9-87Lines changed: 9 additions & 87 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ Available options:
67
67
***`SupportedNameIdFormats`**
68
68
Supported NameID formats advertised by the IdP. Defaults to `[ EmailAddress, Unspecified ]`.
69
69
70
-
The NameID format determines how the user is identified to the SP. **Persistent**identifiers are stable and opaque, suitable when the SP needs to correlate the same user across sessions (for example, account linking). **Transient**identifiers are session-scoped and change with each login, best for privacy-sensitive scenarios where the SP does not need a stable identity. **emailAddress** is human-readable but exposes PII and is coupled to a value that can change. Mismatched format expectations are a common source of SSO failures. See [Name Identifiers](/identityserver/saml/concepts.md#name-identifiers) for a full explanation.
70
+
The NameID format determines how the user is identified to the SP. **emailAddress**is human-readable but exposes PII and is coupled to a value that can change. **Unspecified**leaves the format to the IdP's discretion. Persistent and transient formats are planned for a future release. Mismatched format expectations are a common source of SSO failures. See [Name Identifiers](/identityserver/saml/concepts.md#name-identifiers) for a full explanation.
71
71
72
72
***`DefaultClockSkew`**
73
73
Clock skew tolerance for validating SAML message timestamps. Defaults to 5 minutes.
@@ -92,9 +92,6 @@ Available options:
92
92
***`EmailNameIdClaimType`**
93
93
The claim type used to resolve an email-format NameID. Defaults to `ClaimTypes.Email`. Per-SP overrides are set via `SamlServiceProvider.EmailNameIdClaimType`.
94
94
95
-
***`SigninStateCookieName`**
96
-
Name of the cookie used to store SAML sign-in state between the initial request and the callback. Defaults to `__IdsSvr_SamlSigninState`.
97
-
98
95
***`UserInteraction`**
99
96
Configures SAML endpoint paths. See [SamlUserInteractionOptions](#samluserinteractionoptions) below.
Use `Saml2Options` when you need to control the IdP's published identity (entity ID), the URL paths it listens on, or the shape of the metadata document it serves to Service Providers. Most deployments only need to set `EntityId`; the remaining defaults are suitable for standard configurations.
159
+
Use `Saml2Options` when you need to control the IdP's published identity (entity ID), the URL paths it listens on, or the shape of the metadata document it serves to Service Providers. Most deployments do not need to set `EntityId` explicitly; the default (`{host}/saml`) is suitable for standard configurations.
163
160
164
161
Available options:
165
162
166
163
***`EntityId`** (`string?`)
167
-
The SAML entity ID of this IdP. If not set, IdentityServer derives it from the OIDC issuer URL combined with `EntityIdPath`. Defaults to `null`.
164
+
The SAML entity ID of this IdP. If not set, IdentityServer derives it from the host URL combined with `EntityIdPath` (resulting in `{host}/saml` by default). Most deployments do not need to set this explicitly. Defaults to `null`.
168
165
169
166
***`EntityIdPath`** (`string`)
170
167
Path component appended to the OIDC issuer URL when `EntityId` is not explicitly set. Defaults to `/saml`.
@@ -189,14 +186,14 @@ Available options:
189
186
190
187
## SamlServiceProvider Model
191
188
192
-
`SamlServiceProvider` represents a registered SAML 2.0 Service Provider. Each SP has its own entity ID, ACS endpoints, signing and encryption certificates, and claim configuration. SPs can be registered statically in code or managed dynamically via the admin API.
189
+
`SamlServiceProvider` represents a registered SAML 2.0 Service Provider. Each SP has its own entity ID, ACS endpoints, signing certificates, and claim configuration. SPs can be registered statically in code or managed dynamically via a custom store.
193
190
194
191
Most properties on `SamlServiceProvider` are optional overrides of the global defaults set in `SamlOptions`. When a property is `null`, the corresponding `SamlOptions` default applies. This lets you configure sensible defaults once and only specify per-SP values where behavior needs to differ.
195
192
196
193
Available options:
197
194
198
-
***`EntityId`** (`ServiceProviderEntityId`)
199
-
The SP's entity identifier, as declared in its SAML metadata. Required. Parsed via `ServiceProviderEntityId.Parse("https://sp.example.com", CultureInfo.InvariantCulture)`. See [ServiceProviderEntityId](#serviceproviderentityid) below.
195
+
***`EntityId`** (`string`)
196
+
The SP's entity identifier, as declared in its SAML metadata. Required.
200
197
201
198
***`DisplayName`** (`string`)
202
199
Human-readable name shown in logs and consent screens. Required.
ScopesassociatedwiththisSP. Usedtodeterminewhichidentityresources (andtheirclaimtypes)areavailablefor inclusion in assertions. When empty, all mapped claims are included. Defaults to empty.
When using the Admin API (`ISamlServiceProviderAdmin`), certificates are passed as `CertificateDto` objects with a `Base64Data` string and an optional `FriendlyName`. See [Service Providers](/identityserver/saml/service-providers.md) for details.
`ServiceProviderEntityId` is a value object that represents a SAML SP's entity ID string. It provides type safety and validation for entity ID values, preventing raw strings from being used where a validated entity ID is expected.
382
-
383
-
Parse an entity ID from a string using the static `Parse` method:
384
-
385
-
```csharp
386
-
varentityId=ServiceProviderEntityId.Parse(
387
-
"https://sp.example.com",
388
-
CultureInfo.InvariantCulture);
389
-
```
390
-
391
-
Use `ServiceProviderEntityId` when setting `SamlServiceProvider.EntityId` in code, or when working with entity IDs returned from the admin API.
0 commit comments