I have an Azure B2C service which serves to signing-up/signing-in users for my external apps (not hosted on Azure). The problem is that I have a few apps using this and I'd like to notify each of them when any user data change occurs in Active Directory (eg. email). Is there any functionality on Azure which could trigger some notifications to my apps about the change so the app could update its database?
1 Answers
Short answer is yes
.
Long - probably too complex and definitely not within the scope of Azure AD B2C.
Can you live without this notification? Changing an e-mail address has no influence on core user data (unique identifier, oid
claim). If you keep local user profile data in your application (which seems to be so), then you have to make sure you are referencing users by the oid
claim you get from B2C and not by their e-mail addresses. Thus, any time a user signs-in you can check whether you have up to date info.
Do not forget, that changing e-mail address in Azure AD B2C is technically an execution of a B2C policy. Each execution of B2C policy ends with user being redirected somewhere (usually the application which triggered that policy) with a new token. A (relatively) simple solution would be to handle the callback of this authentication request (policy) and do what you want with it. For example have a notification service that would inform all applications about a change (think of EventGrid Topic where all your apps have a subscription to).