-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Update Identity custom user data documentation for .NET 8/9 with MVC instructions and troubleshooting #36222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: wadepickett <[email protected]>
…checklist, troubleshooting, and fix grammar issues Co-authored-by: wadepickett <[email protected]>
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. |
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 and MVC projects.Closes #[issue number]
Changes Made
1. Added .NET 9 Sample Code
Created a new
9.x/SampleAppsample by copying and updating the 6.x sample:WebApp1.csprojto targetnet9.0NameandDOBproperties toIdentityUser2. Added .NET 9 and .NET 8 Moniker Sections
Both 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:
For .NET 8: Includes a prominent NOTE that the code is identical to .NET 9 (only the target framework differs), so both versions reference the same 9.x sample to avoid duplication.
3. Updated Existing Sections
>= aspnetcore-6.0to>= aspnetcore-6.0 < aspnetcore-8.04. Updated Metadata
ms.dateto 10/15/2025ai-usage: ai-assistedWhy These Changes Matter
For .NET 8/9 Users: The documentation now explicitly covers current LTS and STS versions 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
#region snippet) verified in source filesThe 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