When a new user registers in my ASP.NET Core app, I need to create a new "organization account" for the user as well as a "user account". I want Azure AD B2C to handle the user account but I want to handle the organization account in my backend.
The organization account allows multiple users to share an account. The process could be as simple as sending Azure AD B2C the new GUID
value I'll be using for the account. I want this account Id to be included in the JWT
token claims.
How do I pass this account Id to Azure AD B2C? It's important that I pass the account Id to Azure AD B2C because I can use that approach while handling adding new users to an existing organization account.
So, how do I pass some values from my backend to Azure AD B2C during user registration?
P.S. I want to further clarify the process of adding a new user to an existing organization account. The organization account admin sends an invite to another user. This invitation will allow me to pull the existing account Id and pass it along to Azure AD B2C so that in the JWT
token, the account Id can be included. It would be nice to add the organization account name as well e.g. AccountName: Acme, Inc.
and AccountId: 7f6818d9-4167-4a57-99ee-2f313a230a7b