Back to Aspnetcore

Articles based on ASP.NET Core projects created with individual accounts

aspnetcore/security/authentication/individual.md

latest4.0 KB
Original Source

Articles based on ASP.NET Core projects created with individual accounts

ASP.NET Core Identity is included in project templates in Visual Studio with the "Individual Accounts" option.

The authentication templates are available in .NET CLI with -au Individual:

:::moniker range=">= aspnetcore-2.1"

dotnetcli
dotnet new mvc -au Individual
dotnet new webapp -au Individual

:::moniker-end

:::moniker range="= aspnetcore-2.0"

dotnetcli
dotnet new mvc -au Individual
dotnet new razor -au Individual

:::moniker-end

See this GitHub issue for web API authentication.

<a name="no"></a>

No Authentication

Authentication is specified in the .NET CLI with the -au option. In Visual Studio, the Change Authentication dialog is available for new web applications. The default for new web apps in Visual Studio is No Authentication.

Projects created with no authentication:

  • Don't contain web pages and UI to sign in and sign out.
  • Don't contain authentication code.

<a name="win"></a>

Windows Authentication

Windows Authentication is specified for new web apps in the .NET CLI with the -au Windows option. In Visual Studio, the Change Authentication dialog provides the Windows Authentication options.

If Windows Authentication is selected, the app is configured to use the Windows Authentication IIS module. Windows Authentication is intended for Intranet web sites.

dotnet new webapp authentication options

The following table shows the authentication options available for new web apps:

OptionType of authenticationLink for more information
NoneNo authentication.
IndividualIndividual authentication.xref:security/authentication/identity
IndividualB2CCloud-hosted individual authentication with Azure AD B2C.Azure AD B2C
SingleOrgOrganizational authentication for a single tenant. Entra External ID tenants also use SingleOrg.Entra ID
MultiOrgOrganizational authentication for multiple tenants.Entra ID
WindowsWindows authentication.Windows Authentication

[!INCLUDE]

Visual Studio new webapp authentication options

The following table shows the authentication options available when creating a new web app with Visual Studio:

OptionType of authenticationLink for more information
NoneNo authentication
Individual Accounts / Store user accounts in-appIndividual authenticationxref:security/authentication/identity
Individual Accounts / Connect to an existing user store in the cloudCloud-hosted individual authentication with Azure AD B2CAzure AD B2C
Work or School Cloud / Single OrgOrganizational authentication for a single tenantAzure AD
Work or School Cloud / Multiple OrgOrganizational authentication for multiple tenantsAzure AD
WindowsWindows authenticationWindows Authentication

[!INCLUDE]

Additional resources

The following articles show how to use the code generated in ASP.NET Core templates that use individual accounts: