Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trigger azure function on user registration in b2c

I want to trigger a function when a user registers in my azure AD B2C. But I can't find any examples on this. Is the user added to any queue or stored in any table? Or do I need to look at the respons back when the user clicks the "register" button in my app?

I followed this guide to create my B2C. What I want is to eg. send a welcome mail.

like image 276
thatsIT Avatar asked Jan 28 '23 14:01

thatsIT


1 Answers

Azure AD B2C does not have any support for custom emails events or custom triggers through its built-in policies.

However, you can use Azure AD B2C custom policies to call out to a REST API that sends an email as part of the authentication flow. You can easily implement this REST API using an Http Triggered Azure Function.

Check out the sample code for such Azure function in the sample SendMailWebHook function.

You can also request support for custom email events in the Azure AD B2C feedback forum

like image 172
Mohit_Garg Avatar answered Jan 31 '23 03:01

Mohit_Garg