Corely.IAM
7.4.0
See the version list below for details.
dotnet add package Corely.IAM --version 7.4.0
NuGet\Install-Package Corely.IAM -Version 7.4.0
<PackageReference Include="Corely.IAM" Version="7.4.0" />
<PackageVersion Include="Corely.IAM" Version="7.4.0" />
<PackageReference Include="Corely.IAM" />
paket add Corely.IAM --version 7.4.0
#r "nuget: Corely.IAM, 7.4.0"
#:package Corely.IAM@7.4.0
#addin nuget:?package=Corely.IAM&version=7.4.0
#tool nuget:?package=Corely.IAM&version=7.4.0
Corely.IAM
Host-agnostic, multi-tenant identity and access management for .NET applications. Drop-in authentication, authorization, RBAC, and permission management, with no external service dependencies.
Upgrading from 1.x? See MIGRATION-2.0.md. MariaDB support is removed, MySQL moved to Oracle's provider and its databases must be recreated, and the target framework is
net10.0only. SQL Server is unaffected.
graph LR
subgraph Host App
A[IAMOptions.Create] --> B[AddIAMServices]
end
B --> C[IRegistrationService]
B --> D[IAuthenticationService]
B --> E[IRetrievalService]
B --> F[IModificationService]
B --> G[IMfaService]
C & D & E & F & G --> H[Processors]
H --> I[Repositories]
I --> J[(Database)]
style A fill:#4a9eff,color:#fff
style B fill:#4a9eff,color:#fff
style C fill:#2ecc71,color:#fff
style D fill:#2ecc71,color:#fff
style E fill:#2ecc71,color:#fff
style F fill:#2ecc71,color:#fff
style G fill:#2ecc71,color:#fff
style H fill:#f39c12,color:#fff
style I fill:#e74c3c,color:#fff
style J fill:#9b59b6,color:#fff
Highlights
- Multi-tenant accounts: users belong to multiple accounts with scoped RBAC
- CRUDX permissions: fine-grained Create / Read / Update / Delete / Execute per resource type
- Token-based auth: JWT with custom claims, no HttpContext dependency
- System context: headless processes (Azure Functions, background services) can call APIs without user authentication
- Platform account: an optional, bootstrapped account whose members' permissions apply in every account (docs)
- Password recovery: email-based recovery tokens for unauthenticated password reset
- Multi-factor authentication: TOTP (authenticator apps) with recovery codes
- Federated sign-in: sign in with Google, Microsoft, GitHub, Facebook or Amazon
- Invitation system: token-based onboarding with expiry and revocation
- Per-entity encryption: account and user-scoped key pairs, stored encrypted
- Pluggable crypto: configure algorithms via the
IAMOptionsbuilder - Two database providers: SQL Server and MySQL via EF Core
Quick Start
1. Create the database schema
The library never applies migrations at runtime. Create the schema with the migration tool, which ships both providers' migrations:
dotnet tool install --global Corely.IAM.DataAccessMigrations.Cli
corely-iam-db db create -p MsSql -c "Server=(localdb)\MSSQLLocalDB;Database=CorelyIam;Trusted_Connection=True;"
See the Migration CLI docs for deployment scripting, environment-variable configuration, and running against MySQL.
2. Register and use the services
// Register services
var options = IAMOptions.Create(configuration, securityConfigProvider, efConfigFactory);
services.AddIAMServices(options);
// Register a user and account
var registrationService = serviceProvider.GetRequiredService<IRegistrationService>();
var userResult = await registrationService.RegisterUserAsync(
new RegisterUserRequest("admin", "admin@example.com", "P@ssw0rd!"));
var accountResult = await registrationService.RegisterAccountAsync(
new RegisterAccountRequest("My Organization"));
Documentation
| Docs | Description |
|---|---|
| Corely.IAM | Core library: setup, services, domains, security, architecture |
| Gotchas | What the library leaves to you, and what goes wrong if you miss it. Read this before storing your own rows per account |
| Corely.IAM.Web | Pre-built Blazor UI: auth pages, account management, RBAC visualization |
| DevTools CLI | Crypto operations and IAM service interaction from the command line |
| Migration CLI | Database creation, migrations, and scripting |
Solution Structure
| Project | Purpose |
|---|---|
Corely.IAM |
Core library: business logic, data access, security |
Corely.IAM.Web |
Blazor Server UI: pages, components, auth flow |
Corely.IAM.WebApp |
Host application (reference implementation) |
Corely.IAM.Demos.UsersOnly |
Demo app: users sign up and own their data, no accounts or roles |
Corely.IAM.Demos.SharedAccount |
Demo app: one team account shared by invited users, no roles to manage |
Corely.IAM.UnitTests |
Test suite (xUnit, Moq, AutoFixture, FluentAssertions) |
Corely.IAM.DevTools |
Developer CLI for crypto and IAM operations |
Corely.IAM.DataAccessMigrations.Cli |
Migration CLI that creates and migrates the IAM schema (published as a .NET tool) |
Corely.IAM.Testing |
Test only package: proves every service method of an app has a cross account attack or a reasoned exemption |
Corely.IAM.DataAccessMigrations.MsSql / .MySql |
EF Core migrations per database provider, bundled into the CLI |
Corely.IAM.CompiledModel.MsSql / .MySql |
Optional: IAM's EF Core model built ahead of time for one provider, so an app skips building it on its first database call. Released with Corely.IAM at the same version |
License
See LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Corely.Common (>= 2.0.4)
- Corely.DataAccess (>= 3.2.0)
- Corely.Security (>= 3.1.2)
- FluentValidation (>= 12.2.0)
- FluentValidation.DependencyInjectionExtensions (>= 12.2.0)
- Microsoft.EntityFrameworkCore (>= 10.0.12)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection (>= 10.0.12)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.11)
- Microsoft.IdentityModel.Protocols.OpenIdConnect (>= 8.23.0)
- Microsoft.IdentityModel.Tokens (>= 8.23.0)
- Scrutor (>= 7.0.0)
- System.IdentityModel.Tokens.Jwt (>= 8.23.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Corely.IAM:
| Package | Downloads |
|---|---|
|
Corely.IAM.Web
ASP.NET Core integration for Corely IAM. Provides middleware, services, and Razor components for web-based identity and access management. |
|
|
Corely.Billing.IAM
Corely.IAM permissions for Corely.Billing: the grant, consumption and quota resource types and the decorators that check them |
|
|
Corely.IAM.CompiledModel.MsSql
Corely.IAM's Entity Framework model built ahead of time for SQL Server, so an app on SQL Server skips building it on its first database call. Released with Corely.IAM at the same version. |
|
|
Corely.IAM.CompiledModel.MySql
Corely.IAM's Entity Framework model built ahead of time for MySQL and MariaDB, so an app on MySQL or MariaDB skips building it on its first database call. Released with Corely.IAM at the same version. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.5.1 | 0 | 11/17/2026 |
| 7.5.0 | 83 | 11/16/2026 |
| 7.4.0 | 106 | 11/15/2026 |
| 7.3.0 | 203 | 11/9/2026 |
| 7.2.0 | 125 | 11/9/2026 |
| 7.1.0 | 139 | 11/9/2026 |
| 7.0.0 | 195 | 11/8/2026 |
| 6.8.0 | 120 | 11/7/2026 |
| 6.7.0 | 141 | 11/4/2026 |
| 6.6.0 | 147 | 11/1/2026 |
| 6.5.0 | 128 | 11/1/2026 |
| 6.4.0 | 116 | 11/1/2026 |
| 6.3.0 | 118 | 10/31/2026 |
| 6.2.0 | 159 | 10/31/2026 |
| 6.1.0 | 220 | 10/27/2026 |
| 6.0.1 | 135 | 10/27/2026 |
| 6.0.0 | 124 | 10/27/2026 |
| 5.2.0 | 111 | 10/27/2026 |
| 5.1.0 | 308 | 10/17/2026 |
| 5.0.0 | 144 | 10/16/2026 |