Share via

Azure B2C Auto Incrementing or Integer User ID?

Anonymous
2021-03-02T20:18:16.173+00:00

I have a requirement where the application I'm working on needs an integer-based user ID associated with each user. I know that B2C generates a hexadecimal UUID, but that would be a very large number if converted to an integer.

Before my client switched to B2C, they used an auto incrementing column for each user in the database. But I don't know of an easy way to implement this in B2C. I know how to create custom attributes, which we already use. But I don't know how to create a custom attribute that would auto increment like this.

It doesn't even have to be an auto incremented value, but just an integer value that isn't enormous. One thought was to use the array index of the user, but then anytime a user is deleted, the other IDs would have to be updated in the database, so that's not really feasible.

Any suggestions would be greatly appreciated.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
0 comments No comments

1 answer

Sort by: Most helpful
  1. Jitendra Rai 231 Reputation points
    2021-03-04T11:23:53.87+00:00

    Thanks @Anonymous and Please use rest api integration with Azure B2C custom application to implement auto incrementing integer concepts with custom policy. Please refer this document- https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-rest-api-intro/

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.