Skip to content
Introducing the next era of Duende IdentityServer. Read our CEO’s announcement

SAML Service Provider Store

Added in 8.0

The ISamlServiceProviderStore interface is the contract for a service that retrieves SAML 2.0 Service Provider configuration by entity identifier. It is part of the SAML 2.0 Identity Provider feature that was added in v8.0.

Duende.IdentityServer.Stores.ISamlServiceProviderStore

Section titled “Duende.IdentityServer.Stores.ISamlServiceProviderStore”
/// <summary>
/// Interface for retrieval of SAML Service Provider configuration.
/// </summary>
public interface ISamlServiceProviderStore
{
/// <summary>
/// Finds a SAML Service Provider by its entity identifier.
/// </summary>
/// <param name="entityId">The entity identifier of the Service Provider.</param>
/// <param name="ct">The cancellation token.</param>
/// <returns>The Service Provider, or null if not found.</returns>
Task<SamlServiceProvider?> FindByEntityIdAsync(string entityId, CancellationToken ct);
/// <summary>
/// Returns all registered SAML Service Providers.
/// </summary>
/// <param name="ct">The cancellation token.</param>
/// <returns>An async enumerable of all Service Providers.</returns>
IAsyncEnumerable<SamlServiceProvider> GetAllSamlServiceProvidersAsync(CancellationToken ct);
}

For full details on the SamlServiceProvider model and how to register service providers, see the SAML Service Providers page.