|
1 | 1 | --- |
2 | 2 | title: Add, download, and delete user data to Identity in an ASP.NET Core project |
| 3 | +ai-usage: ai-assisted |
3 | 4 | author: wadepickett |
4 | 5 | description: Learn how to add custom user data to Identity in an ASP.NET Core project. Delete data per GDPR. |
5 | 6 | ms.author: wpickett |
6 | | -ms.date: 03/15/2022 |
7 | 7 | ms.custom: mvc |
| 8 | +ms.date: 04/09/2026 |
8 | 9 | uid: security/authentication/add-user-data |
9 | 10 | --- |
10 | 11 | # Add, download, and delete custom user data to Identity in an ASP.NET Core project |
@@ -32,13 +33,20 @@ The project sample is created from a Razor Pages web app, but the instructions a |
32 | 33 |
|
33 | 34 | * From the Visual Studio **File** menu, select **New** > **Project**. Name the project **WebApp1** if you want to it match the namespace of the [download sample](https://github.com/dotnet/AspNetCore.Docs/tree/live/aspnetcore/security/authentication/add-user-data) code. |
34 | 35 | * Select **ASP.NET Core Web Application** > **OK** |
| 36 | +* In the **Authentication type** dropdown, select **Individual Accounts**. |
35 | 37 | * Select **Web Application** > **OK** |
36 | 38 | * Build and run the project. |
37 | 39 |
|
38 | 40 | # [.NET CLI](#tab/net-cli) |
39 | 41 |
|
40 | 42 | ```dotnetcli |
41 | | -dotnet new webapp -o WebApp1 |
| 43 | +dotnet new webapp --auth Individual -o WebApp1 |
| 44 | +``` |
| 45 | + |
| 46 | +For an MVC project, use the following command: |
| 47 | + |
| 48 | +```dotnetcli |
| 49 | +dotnet new mvc --auth Individual -o WebApp1 |
42 | 50 | ``` |
43 | 51 |
|
44 | 52 | --- |
@@ -179,13 +187,20 @@ Test the app: |
179 | 187 |
|
180 | 188 | * From the Visual Studio **File** menu, select **New** > **Project**. Name the project **WebApp1** if you want to it match the namespace of the [download sample](https://github.com/dotnet/AspNetCore.Docs/tree/live/aspnetcore/security/authentication/add-user-data) code. |
181 | 189 | * Select **ASP.NET Core Web Application** > **OK** |
| 190 | +* In the **Authentication** section, select **Individual User Accounts**. |
182 | 191 | * Select **Web Application** > **OK** |
183 | 192 | * Build and run the project. |
184 | 193 |
|
185 | 194 | # [.NET CLI](#tab/net-cli) |
186 | 195 |
|
187 | 196 | ```dotnetcli |
188 | | -dotnet new webapp -o WebApp1 |
| 197 | +dotnet new webapp --auth Individual -o WebApp1 |
| 198 | +``` |
| 199 | + |
| 200 | +For an MVC project, use the following command: |
| 201 | + |
| 202 | +```dotnetcli |
| 203 | +dotnet new mvc --auth Individual -o WebApp1 |
189 | 204 | ``` |
190 | 205 |
|
191 | 206 | --- |
@@ -401,13 +416,20 @@ The additional claim can then be used in the app. In a Razor Page, the `IAuthori |
401 | 416 | * From the Visual Studio **File** menu, select **New** > **Project**. Name the project **WebApp1** if you want to it match the namespace of the [download sample](https://github.com/dotnet/AspNetCore.Docs/tree/live/aspnetcore/security/authentication/add-user-data) code. |
402 | 417 | * Select **ASP.NET Core Web Application** > **OK** |
403 | 418 | * Select **ASP.NET Core 2.2** in the dropdown |
| 419 | +* In the **Authentication** section, select **Individual User Accounts**. |
404 | 420 | * Select **Web Application** > **OK** |
405 | 421 | * Build and run the project. |
406 | 422 |
|
407 | 423 | # [.NET CLI](#tab/net-cli) |
408 | 424 |
|
409 | 425 | ```dotnetcli |
410 | | -dotnet new webapp -o WebApp1 |
| 426 | +dotnet new webapp --auth Individual -o WebApp1 |
| 427 | +``` |
| 428 | + |
| 429 | +For an MVC project, use the following command: |
| 430 | + |
| 431 | +```dotnetcli |
| 432 | +dotnet new mvc --auth Individual -o WebApp1 |
411 | 433 | ``` |
412 | 434 |
|
413 | 435 | --- |
|
0 commit comments