Start here
Choose the shortest SqlOS path for your .NET application.
Start with one application and hosted login. Add organizations, SSO, and SQL-backed authorization when your product needs them.
These docs target SqlOS 7.1.0, .NET 9, EF Core 9, and SQL Server or PostgreSQL. Use the same package version as the docs; older releases do not include the complete current schema and source/reference contract.
Almost every SqlOS host is one product. Describe it once and SqlOS derives the routes, token validation, metadata documents, client registration, and seeds:
builder.AddSqlOS<AppDbContext>(
db => db.UseSqlServer(connectionString),
options => options.UseSingleApplication("Acme", app =>
{
app.Origin = "https://acme.example.com";
app.Api = "/api"; // resource id {Origin}/api
app.Mcp = "/mcp"; // resource id {Origin}/mcp
app.Brand(page => page.PrimaryColor = "#0f172a"); // hosted sign-in, or app.Headless("/auth/authorize") for your own UI
app.Authorization(fga => /* resource types, permissions, roles */ fga);
}));Origin, Api, Mcp, Brand, Headless, Authorization, Dashboard — what each line does and its default.
Install the package, paste one Program.cs, run it.
Use the built-in OpenID Connect handler, PKCE, and a secure application cookie.
Declare app.Api, RequireAuthorization(), and read the validated token.
Declare app.Authorization and filter rows in SQL.
See hosted login and authorized EF Core queries without changing an app.
The normal path is incremental:
Origin; hosted login and the dashboard work immediately.Api to protect your application API.Authorization only to data that needs fine-grained rules.Brand or Headless, an Mcp server, social login, SAML SSO, MFA, and audit as requirements appear.When other applications should sign in with your accounts — another browser app, a CLI alongside it, or a partner using "Sign in with Acme" — use ConfigureApplication with explicit client registrations. A separate frontend and API can still be one client application. Start there only when a second application exists.
Keep the host description with ConfigureApplication and register each client explicitly.
Let other products use your accounts as their identity provider.
The sidebar is grouped by product capability: host, sign-in, tokens, clients, MCP, organizations, directory, authorization, and operations. Start at Getting Started or the runnable examples.
Choose the shortest SqlOS path for your .NET application.
The canonical SqlOS setup: describe one application in one AddSqlOS call and let SqlOS derive the protocol consequences.
Choose between hosted and headless auth UI.
Access tokens, refresh tokens, validation, and session lifecycle.
Choose the right client onboarding path for owned apps, portable clients, and compatibility clients.
Declare an MCP resource in SqlOS and host Microsoft's MCP SDK on that path.
Create tenants and manage multi-org membership.
Provision users and groups from an enterprise IdP into AuthServer and FGA.
Hierarchical authorization for .NET apps with query-time filtering.
Record application audit events and review them in the SqlOS dashboard.
Source-aligned reference for SqlOS 7.1.0 hosting, authentication, authorization, and integration APIs.