How to configure SMTP for Azure AD B2C email verification

The Great Ape 1 Reputation point
2023-01-13T16:00:15.2266667+00:00

I wan to send customized email for SSO via AD B2C. I see that the documentation covers sending custom email via third party providers or via SSPR Technical profile. I'm trying to use the SSPR technical profile.

However, there is no reference as to how the email is sent to the customer. It doesn't explain how the SMTP is configured for AD B2C to be able to send an email from our customized email address. Can someone point of how this is achieved?

The documentation for third party emails also don't cover how do we set SMTP configuration.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,451 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Dimple Rane 911 Reputation points MVP
    2023-01-16T04:47:13.49+00:00

    To configure SMTP for sending customized emails via AD B2C, you can use the Azure AD B2C custom email feature. This feature allows you to configure an SMTP server to send emails from your own email address, rather than from the default Azure AD B2C email address.

    To set up the SMTP server, you will need to follow these steps:

    1. In the Azure portal, navigate to the Azure AD B2C tenant that you want to use for sending customized emails.
    2. In the left navigation, click on "Identity Experience Framework" and then select "Email Templates" from the drop-down menu.
    3. In the "Email Templates" blade, click on the "Add" button to create a new template.
    4. In the "Create Email Template" blade, enter a name for the template and select the appropriate language.
    5. In the "SMTP Configuration" section, enter the SMTP server details. This will include the host name, port, username, and password.
    6. In the "Customized Email" section, you can customize the email subject and body. You can also add custom fields and tokens to the email.
    7. Click on "Save" to create the template.
    8. To use this template in your technical profile, you will need to add the "CustomEmail" technical profile to your policy and reference your new template.

    Once you have set up the SMTP configuration, you can use the CustomEmail technical profile to send customized emails via AD B2C. Be sure to test the configuration before deploying it to production.

    Documentation :-

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-email-sendgrid?pivots=b2c-custom-policy#create-azure-ad-b2c-policy-key


  2. Shweta Mathur 30,101 Reputation points Microsoft Employee
    2023-01-23T07:35:17.9733333+00:00

    Hi @The Great Ape ,

    Thanks for reaching out.

    Unfortunately, it is not possible to configure SMTP to send an email directly to the customers.

    You must call your own REST API, which you can then configure to talk to SMTP service.

    Configure SSPR for sending verification email to the B2C users from any third-party provider.

    SSPR is responsible for sending verification emails to the B2C users and then third-party provider will interact with SMTP servers to send emails.

    Hope this will help.

    Thanks,

    Shweta


    Please remember to "Accept Answer" and "rate" your experience if the above answer helped. This will help us and others in the community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.