# Add to aspnetuser columns

**URL:** <https://forum.radzen.com/t/add-to-aspnetuser-columns/12412>\
**Category:** Angular\
**Created:** [December 2, 2022, 10:31am UTC](https://forum.radzen.com/t/add-to-aspnetuser-columns/12412 "2022-12-02T10:31:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dino](https://forum.radzen.com/letter_avatar_proxy/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.radzen.com/u/Dino)\
**Post date:** [December 2, 2022, 10:31am UTC](https://forum.radzen.com/t/add-to-aspnetuser-columns/12412/1 "2022-12-02T10:31:44Z")

</div>

HI, I have trouble with adding new columns in aspnetusers table. I am looking in both your tutorials on net  
[Extend application user (Angular)](https://www.radzen.com/documentation/extend-application-user/) and [Customize security (Angular)](https://www.radzen.com/documentation/crm-security) "dotnet ef migrations add ExtendApplicationUser -c ApplicationIdentityDbContext" but when I run this in cmd I get an error C:\Projekti\RadzenProjekt\PLANER\_WEDDING\Source\Web\server\project.csproj(22,5): error MSB3073: The command "npm instal  
l" exited with code 1. Could you please help me?

---

<div class="post-metadata">

**Author:** ![Dino](https://forum.radzen.com/letter_avatar_proxy/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.radzen.com/u/Dino)\
**Post date:** [December 5, 2022, 1:21pm UTC](https://forum.radzen.com/t/add-to-aspnetuser-columns/12412/2 "2022-12-05T13:21:32Z")

</div>

I added multiple colums to my project in table aspnetusers. Today until 12:00 this worked fine, I made several application users. After that I get an undifiend error, but record with all my data when I second time click on save I get notfication that email address that already exist in error section. When i make reload of page I get this result with all fields.

 ![Screenshot_1](https://forum.radzen.com/uploads/default/original/2X/8/8f9b4983064bef4aa03b966fb1c5b760e24cbdac.png)  
I only invoke createUser without anything else. Output in Web gives this error  
 ![Screenshot_2](https://forum.radzen.com/uploads/default/original/2X/c/c26a7df73600921f79574a2b0a5d97450f8e6bf4.png)

I founded in Radzen Output that this is the line with problem:

var roles = data.GetValue("RoleNames").ToObject\<IEnumerable\>();

But real problem is that i dont insert nothing in table aspnetusersroles.

You can see my method that I pass in table aspnetusers

"BrideName": "�ur�a",  
"BrideSurname": "Kresnik",  
"Email": "demo\_a@demo.hr",  
"BrideOIB": 111111111111,  
"BrideAddress": "Kresnikova 10",  
"GroomName": "�uro",  
"GroomSurname": "Nobilo",  
"GroomMail": "djuro@demo.hr",  
"GroomOIB": 111111111111,  
"GroomAddress": "Nobilova 12",  
"WeddingDate": "2022-12-30T00:00:00Z",  
"WeddingLocation": "Admiral",  
"Password": "Demo123!",  
"ConfirmPassword": "Demo123!"  
}) - Validation state: Valid

But you cant see the roleNames but I have role in the add application user  
in radzen

![Screenshot_3](https://forum.radzen.com/uploads/default/original/2X/3/37440a672dfe2c0e76daeb17d4dcff9abbf31bdf.png)

 ![Screenshot_4](https://forum.radzen.com/uploads/default/original/2X/b/baeb34bcbc0668594346c8d7c4fff23f19360f65.png)  
Could you please help me?

---

<div class="post-metadata">

**Author:** ![mumfie](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/b4bc9f/32.png) [@mumfie](https://forum.radzen.com/u/mumfie)\
**Post date:** [December 5, 2022, 3:35pm UTC](https://forum.radzen.com/t/add-to-aspnetuser-columns/12412/3 "2022-12-05T15:35:02Z")

</div>

Did it work before you added the columns and do you populate your added fields or use database defaults?  
The default security template passes _User_ as a parameter to createUser. You should _not_ directly access _aspnetusers_ from your code. You probably don't need to assign a role to create the user.

 ![image](https://forum.radzen.com/uploads/default/original/2X/b/bd006c02124632f439d27c303a68ef8b42d2187c.png)  
Did you try to debug your code?

---

<div class="post-metadata">

**Author:** ![Dino](https://forum.radzen.com/letter_avatar_proxy/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.radzen.com/u/Dino)\
**Post date:** [December 6, 2022, 7:21am UTC](https://forum.radzen.com/t/add-to-aspnetuser-columns/12412/4 "2022-12-06T07:21:24Z")

</div>

Hi,  
This works fine when I have selected multiple for roles but when I make uncheck multiple from roles column I get an error that I can't create user without any roles.
