When a user signs up to an Azure AD B2C tenant on my single page application, I want to atomically save a JSON data like {userId: "userId", email: "emailAddress} to a Cosmos DB container. How to do this?
When a user signs up to an Azure AD B2C tenant on my single page application, I want to atomically save a JSON data like {userId: "userId", email: "emailAddress} to a Cosmos DB container. How to do this?
Use an API connector at sign up. This will call your API right before the account is created into AAD B2C (or at any point in custom policy). AAD B2C can send all data/claims to any endpoint you specify.
https://docs.microsoft.com/en-us/azure/active-directory-b2c/add-api-connector?pivots=b2c-user-flow
Your API should then call Cosmos DB API to create the record.