Open Closed

Add a user column to the token claims #3029

Frontis created
  • ABP Framework version: v5.1.4
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no


For one of our customers, we want to include an extra identification column, to the (bearer) token claims. It has to be an user column.

For this, i've added the column wisch works so far

**DtoExtensions.cs ObjectExtensionManager.Instance.AddOrUpdateProperty<IdentityUserDto, long>("MonteursId");


private static void ConfigureExtraProperties()
            .ConfigureIdentity(identity =>
                identity.ConfigureUser(user =>


OneTimeRunner.Run(() =>

            ObjectExtensionManager.Instance.MapEfCoreProperty<IdentityUser, long>(
                (entityBuilder, propertyBuilder) =>
                { });

We want the value of "monteursid" to appear in the token, just like it does when you add a claim by the dropdown as shown below.

I've tried multiple things, but it doesn't appear in the token. What can i do to make it happen?

1 Answer(s)
  • 0
    liangshiwei created
    Support Team


    There are two things, you mixed them up

    You can check this: