Hi @Miguel , thanks for the question. These steps should get you where you need to be:
- Set up the custom policy in your Azure AD B2C tenant as described in the invite-via-email repository.
- In your Angular application, use the MSAL for Angular library to handle authentication with Azure AD B2C. You can follow the instructions in doc1 to configure authentication in your Angular SPA.
- In your .NET backend, use the Microsoft.Identity.Web library to handle authentication and token validation.
- Create an API endpoint in your .NET backend that generates an invitation link. This endpoint should:
- Create a user in your Azure AD B2C tenant with a random password.
- Generate a password reset URL using the custom policy you set up in step 1.
- Send an email to the invited user with the password reset URL.
- In your Angular application, create a form to collect the user's email address and call the API endpoint you created in step 4 when the form is submitted.
Please let me know if you have any questions and I can help you further.
If this answer helps you please mark "Accept Answer" so other users can reference it.
Thank you,
James