Update Identity custom user data documentation for .NET 8/9/10 with MVC instructions and troubleshooting#36222
Update Identity custom user data documentation for .NET 8/9/10 with MVC instructions and troubleshooting#36222
Conversation
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
…checklist, troubleshooting, and fix grammar issues Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Corrected copilot text.
|
Notes: Wade's AI issue handling tests: For this issue + PR:
Verified the app generated also followed our rules for not using minified versions of assets as instructed (bootstrap, jquery) since our .gitignore file excludes them. This AI gen PR followed the new instructions on that perfectly here.
Corrections to AI draft: Next:
|
|
Reminder for myself: @krm240 who created the issue, was kind to offer to test through the new steps on the resulting topic update for useability. Loop in krm240 when this is ready to be reviewed. |
|
Correct, once ready, I will gladly test the process for you, But be aware, I am a simple programmer. So, if not clear, may state an issue for me that is not an issue for u.
From: Wade Pickett ***@***.***>
Sent: October 15, 2025 3:20 PM
To: dotnet/AspNetCore.Docs ***@***.***>
Cc: krm240 ***@***.***>; Mention ***@***.***>
Subject: Re: [dotnet/AspNetCore.Docs] Update Identity custom user data documentation for .NET 8/9 with MVC instructions and troubleshooting (PR #36222)
<https://avatars.githubusercontent.com/u/10985336?s=20&v=4> wadepickett left a comment (dotnet/AspNetCore.Docs#36222) <#36222 (comment)>
Reminder, @krm240 <https://github.com/krm240> who created the issue, was kind to offer to test through the new steps on the resulting topic update for useability. Loop in krm240 when this is ready to be reviewed.
—
Reply to this email directly, view it on GitHub <#36222 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AANXPDUFCB4LOKEZPBAWWUL3X3CCXAVCNFSM6AAAAACJIYIX6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIMBYGUYTGNZRGE> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AANXPDXERR4DBZUXCRDAXA33X3CCXA5CNFSM6AAAAACJIYIX6GWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTWLFHFK6.gif> Message ID: ***@***.*** ***@***.***> >
|
|
@copilot, the instructions for Visual Studio do not match the steps required in the latest UI of Visual Studio Professional Insiders Edition 2026. Update to match. If unsure of how to do this, say so. |
I need clarification on the specific Visual Studio 2026 UI changes. Could you provide details on:
For example:
Without access to VS 2026 Professional Insiders Edition or specific details about the UI changes, I cannot accurately update the instructions. Please provide the correct steps or screenshots of the new UI flow. |
|
Notes: Wade’s AI Issue-Handling Tests Problem: Improvement opportunity: In this case for this PR, the Visual Studio instruction will need to be entered correctly in a commit by a human author. The CLI instruction looks good however. |
|
@copilot, |
… sample files Agent-Logs-Url: https://github.com/dotnet/AspNetCore.Docs/sessions/a5212baf-7008-4422-b808-7856eeab4130 Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Fixed in commit
|
|
@copilot, This PR sample and content update needs to alsl address .NET 10. Add a >= aspnetcore-10.0 moniker section as the primary/top section targeting .NET 10, with a new 10.x sample. |
…unded range Agent-Logs-Url: https://github.com/dotnet/AspNetCore.Docs/sessions/0daffe27-8a7d-4332-a961-5b2e2f748fd1 Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Done in commit
|
Removed outdated author attribution from the article. The article has been rewritten many times since.
|
@copilot The 9.x and 10.x sample apps introduced in this PR are byte-for-byte identical in all code files, only the .csproj target framework and package versions differ. To reduce duplication and maintenance burden, we want to eliminate the 9.x sample folder added in this PR and have the .NET 8, 9, and 10 moniker sections all point to the 10.x sample instead. The pre-existing 2.x, 3.x, and 6.x sample folders and their moniker sections should not be changed. Please make the following changes: Delete the entire aspnetcore/security/authentication/add-user-data/samples/9.x/ folder and all its contents. In the .NET 9 moniker section (>= aspnetcore-9.0 < aspnetcore-10.0) of aspnetcore/security/authentication/add-user-data.md, update all [!code-*] references from samples/9.x/ to samples/10.x/. Also update the Program.cs GitHub link from 9.x to 10.x. Add a NOTE block (same style as the one already in the .NET 8 section) at the top of the moniker section, right after the SDK include, explaining that the code samples reference the 10.x sample folder because the code is identical between .NET 9 and .NET 10, only the target framework and package versions differ in the project file. In the .NET 8 moniker section (>= aspnetcore-8.0 < aspnetcore-9.0), update all [!code-*] references from samples/9.x/ to samples/10.x/. Also update the Program.cs GitHub link from 9.x to 10.x. Update the existing NOTE block to say the samples reference the 10.x sample folder instead of 9.x, and that the code is identical between .NET 8 and .NET 10. |
…0.x sample Agent-Logs-Url: https://github.com/dotnet/AspNetCore.Docs/sessions/81345aba-c8b5-4f90-92ef-64a1aec3019f Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Done in commit
|
Overview
This PR updates the Identity custom user data documentation to address user difficulties in customizing ASP.NET Core Identity with simple properties like
FirstNameandLastName. The documentation was outdated (last updated March 2022) and lacked explicit guidance for .NET 8/9/10 and MVC projects.Changes Made
1. Added .NET 10 Sample Code
Created a new
10.x/SampleAppsample (the single shared sample for .NET 8, 9, and 10):WebApp1.csprojto targetnet10.0NameandDOBproperties toIdentityUser2. Added .NET 10, .NET 9, and .NET 8 Moniker Sections
All new sections include:
Quick Start Checklist: A high-level 6-step guide for the common scenario of adding two custom properties:
[PersonalData]attributeExplicit MVC Instructions: The documentation previously only showed Razor Pages with a note that "instructions are similar for MVC." Now includes:
Troubleshooting Table: Maps common symptoms to likely causes and solutions:
The
.NET 10moniker is the primary/top section. The.NET 9and.NET 8monikers all point to the same10.xsample folder. Each includes a NOTE explaining that the code is identical between versions and only the target framework and package versions differ in the project file.3. Updated Existing Sections
>= aspnetcore-6.0to>= aspnetcore-6.0 < aspnetcore-8.04. Fixed Snippet Markers in Sample Files
Changed
#region/#endregionmarkers to// <snippet>/// </snippet>format in the 10.x.cssample files:Areas/Identity/Pages/Account/Manage/Index.cshtml.csAreas/Identity/Pages/Account/Register.cshtml.cs5. Updated Metadata
ms.dateto 04/02/2026ai-usage: ai-assistedWhy These Changes Matter
For .NET 8/9/10 Users: The documentation now explicitly covers current LTS and STS versions, including .NET 10, with up-to-date sample code.
For MVC Developers: No more confusion about whether the guidance applies—explicit instructions are provided, along with clarification that Identity UI is implemented as Razor Pages regardless of project type.
For Beginners: The Quick Start checklist provides a mental model before diving into details, and the troubleshooting table helps diagnose common mistakes.
Validation
10.xsample// <snippet>/// </snippet>format in all sample.csfilesThe GitHub workflow will validate the documentation build when this PR is reviewed.
Original prompt
This section details on the original issue you should resolve
<issue_title>MVC Customize Identity Issue</issue_title>
<issue_description>### Description
Hi, I have been struggling with adding FirstName LastName custom data into an identityUser customization. Not looking for a detailed, response, but hi level. If I create a new project (MVC Framework 8, authentication type individuals) and started from there, should this work?
Do you have a tutorial that starts from there? Would be nice if not. been trying to do this for min 2-3 years, and I keep giving up because I never can get it to work.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/security/authentication/add-user-data?view=aspnetcore-9.0&tabs=visual-studio
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/security/authentication/add-user-data.md
Document ID
cd157d04-d596-83fa-6edb-24d52193eb34
Platform Id
6617dcc3-4828-8b6c-4b70-b2be2a7b9233
Article author
@wadepickett
Metadata
Related Issues</issue_description>
Comments on the Issue (you are @copilot in this section)
@wadepickett @krm240, you are right, this topic needs some help. Sorry to hear about the awful experience. I didn't author the original article, but I'm checking through to see how we can improve it. Thanks very much for taking the time to let us know. @wadepickett # Issue Analysis: Identity Custom User Data Guidance OutdatedIssue Summary
This is a valid issue.
Developers often need to just add simple custom properties (
FirstName,LastName) to an ASP.NET Core Identity user in a newly created MVC (.NET 8 / 9, Individual Accounts) project. The current article’s sample and narrative focus on a Razor Pages template (6.x-era) and only mentions that instructions are “similar” for MVC, without explicitly showing the modern MVC & Razor Pages templates, currentdotnet newcommands, or a concise high-level checklist. The article is dated (ms.date 03/15/2022), has no moniker section for .NET 7/8/9, and therefore appears stale. This creates friction for developers expecting direct, up-to-date guidance.Decision: Introduce a new .NET 9 (current) sample (
add-user-data/samples/9.x/SampleApp) and reuse it for .NET 8 by noting that the code is identical except forTargetFramework. This avoids creating a separate 8.x sample folder and keeps future maintenance minimal.Scope Validation
Within article intent: Yes. The doc’s purpose is to show how to add, download, and delete custom user data with Identity. Adding explicit guidance for MVC, current versions, and a minimal property scenario (First/Last name) fits squarely within scope.
Target Framework / Tooling (Current vs. Document)
Document currently: monikers up to >=6.0 (lines 25–170 in existing version), plus older 3.x and 2.x sections.
Needed: Add >= aspnetcore-9.0 (primary), add >= aspnetcore-8.0 < aspnetcore-9.0 referencing the 9.x sample, retain/adjust >=6.0 <8.0 as legacy. Update ms.date.
Root Causes of User Difficulty
dotnet new mvc -au Individual).Resolution Strategy
Create a single new
.NET 9sample and reuse its code for.NET 8:aspnetcore/security/authentication/add-user-data/samples/9.x/SampleAppTargetFramework:net9.0Rationale:
Documentation Changes (High-Level)
Metadata
ms.dateto a current date (e.g., 10/15/2025).Moniker Restructure
:::moniker range=">= aspnetcore-9.0"(primary instructions, points to 9.x sample).:::moniker range=">= aspnetcore-8.0 < aspnetcore-9.0"referencing 9.x sample, noting identical code.>= aspnetcore-6.0to>= aspnetcore-6.0 < aspnetcore-8.0for legacy.New Sections / Enhancements
Fixes #36213
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews