Can I specify my own objectId when adding a user in a B2C IEF technical profile?

Michel Liesmons RD 21 Reputation points
2021-07-30T11:38:38.857+00:00

I need to call a backend service during signup, and pass it the objectId of the B2C user.
I would like to do this first and only then create the user in B2C using my own objectId.
If the REST call fails, I do not need to delete the user.
Gaph operations are executed async and chances are very high the user does not exist yet when I try to delete it.

Microsoft Security Microsoft Entra Microsoft Entra External ID
{count} votes

Accepted answer
  1. Michael Taylor 60,161 Reputation points
    2021-07-30T15:21:59.083+00:00

    If it is the standard ObjectId you're thinking about then no that is Azure's unique ID (per tenant) and not under your control. It wouldn't really make sense to me anyway. Imagine you create your own object ID, say 1, how does that in any way tell you whether the user is already in B2C or not? A lookup table in a DB? You can do that using the ObjectID from Azure already.

    What I believe the correct solution should be is that you define your own unique ID using whatever approach you choose to take. You link your unique ID to the Azure ID using a database structure. On your side of the fence you use your unique ID. When you need to call Azure you look up the Azure ID for the given unique ID. If they don't have an Azure ID yet then they aren't in Azure so you'd need to create the account first.

    This linking, by the way, is how you would integrate with any OpenID provider such as Facebook or Google so it gives you flexibility down the road if you need it.


0 additional answers

Sort by: Most helpful

Your answer

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