Skip to main content
A newer version of this page is available. .
All docs
V21.2

Web API Authentication (CTP)

Important

We do not recommend that you use the Web API in production code. We made this service available to gather feedback from anyone who considers it for future use.

The Web API supports all standard ASP.NET Core authentication techniques that you can specify in the MySolution.WebApi\Startup.cs (MySolution.Blazor.Server\Startup.cs) file. See the following topic for more information: Authentication.

If you use the Solution Wizard to create a Web API project, enable authentication on the Choose Security page:

Select authentication

Standard Authentication
The wizard generates JWT authentication scaffolding code for the Web API.
OAuth2 Authentication
The wizard adds the JWT and Azure AD scaffolding code to the MySolution.WebApi\appsettings.json file.
Windows Active Directory
The wizard adds the JWT scaffolding code to the MySolution.WebApi\appsettings.json file and the scaffolding code for Windows Active Directory to the MySolution.WebApi\Properties\launchSettings.json file.

See the following topics for information on how to configure the authentication scaffolding code and manually enable authentication:

See Also