I'm looking for some help with using Azure AD B2C with Power Pages. I've integrated Azure AD B2C as an identity provider with Power Pages previously using the default Sign Up/Sign In and Password Reset user flows.
I now have a more complex requirement and I'm trying to figure out the cleanest way to design and implement and provide the best UX.
The portal will effectively be invitation only for selected existing contacts. Given that we already know the Contact's details (First Name/Last Name/Email Address) we want to complete the Azure AD B2C sign up on behalf of the user rather than using the out-of-the-box invitation process which would require the user to enter their details upon sign up. Once signed up, we will email them a link for logging on and setting a password for the first time. We need to avoid the poor practice of sending a password to a user via email. MFA via Email will be enabled.
Our plan was to implement the default Sign In and Password Reset user flows, without a Sign Up user flow, and use Graph API for creating the users in Azure AD B2C. We can use the returned ID to create the External Identity record and set the username and other portal-specific fields on the contact record etc.
All of this seems to work ok in principle, but we can't figure out how to prompt the user to set their password on first login. The hope was just to send them to the Password Reset page, but it's not clear how we'd do that. Currently users have to go to the Sign In page, click 'Forgot your password?', go through 2 lots of email verification code entry (both requiring the email address to be entered manually), after which the user can finally set the password and successfully login to the portal. This seems clunky at the very least.
Has anyone successfully implemented a similar workflow with a slick UX? If so, how did you achieve it?
Grateful for any help!