title: Custom Email verification in a single orchestration step in AD B2C Custom policies
body: <p>I have a multi-step custom policy that first collects email from user and sends a verification code to the user when user clicks continue. The journey works fine. But the thing is validation of code is happening in next step. I need to bring that code validation in to the first orchestration step. I'm following the below doc to implement this journey:
  "<a href="https://github.com/yoelhor/aadb2c-verification-code" rel="nofollow noreferrer">https://github.com/yoelhor/aadb2c-verification-code</a>"</p>
  
  <p>My technical profile is like the following:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;TechnicalProfile Id="LocalAccountSignUpWithLogonEmail-FirstStep"&gt;
    &lt;DisplayName&gt;Email signup&lt;/DisplayName&gt;
    &lt;Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider,        Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /&gt;
    &lt;Metadata&gt;
      &lt;Item Key="IpAddressClaimReferenceId"&gt;IpAddress&lt;/Item&gt;
      &lt;Item Key="ContentDefinitionReferenceId"&gt;api.localaccountsignup&lt;/Item&gt;
      &lt;Item Key="language.button_continue"&gt;Send verification email&lt;/Item&gt;
      &lt;Item Key="EnforceEmailVerification"&gt;False&lt;/Item&gt;
    &lt;/Metadata&gt;
    &lt;CryptographicKeys&gt;
      &lt;Key Id="issuer_secret" StorageReferenceId="B2C_1A_TokenSigningKeyContainer" /&gt;
    &lt;/CryptographicKeys&gt;
    &lt;InputClaims&gt;
      &lt;InputClaim ClaimTypeReferenceId="email" /&gt;
    &lt;/InputClaims&gt;
    &lt;OutputClaims&gt;
      &lt;OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="Verified.Email" Required="true" /&gt;
      &lt;OutputClaim ClaimTypeReferenceId="verificationCode" /&gt;
    &lt;/OutputClaims&gt;
    &lt;OutputClaimsTransformations&gt;
      &lt;OutputClaimsTransformation ReferenceId="CopyEmailAsReadOnly" /&gt;
    &lt;/OutputClaimsTransformations&gt;
    &lt;ValidationTechnicalProfiles&gt;
      &lt;ValidationTechnicalProfile ReferenceId="REST-API-SendVerificationEmail" /&gt;
    &lt;/ValidationTechnicalProfiles&gt;
    &lt;UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD" /&gt;
  &lt;/TechnicalProfile&gt;
  </code></pre>
  
  <p>and the validation tech profile as follows:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;TechnicalProfile Id="REST-API-SendVerificationEmail"&gt;
    &lt;DisplayName&gt;Sign-Up send link&lt;/DisplayName&gt;
    &lt;Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.RestfulProvider, Web.TPEngine,       Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /&gt;
    &lt;Metadata&gt;
      &lt;Item Key="ServiceUrl"&gt;https://myweb.azurewebsites.net/api/Identity/SendVerificationCode&lt;/Item&gt;
      &lt;Item Key="AuthenticationType"&gt;None&lt;/Item&gt;
      &lt;Item Key="SendClaimsIn"&gt;Body&lt;/Item&gt;
      &lt;Item Key="AllowInsecureAuthInProduction"&gt;true&lt;/Item&gt;
    &lt;/Metadata&gt;
    &lt;InputClaims&gt;
      &lt;InputClaim ClaimTypeReferenceId="email" /&gt;
    &lt;/InputClaims&gt;
    &lt;OutputClaims&gt;
      &lt;OutputClaim ClaimTypeReferenceId="verificationCode" /&gt;
    &lt;/OutputClaims&gt;
    &lt;UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" /&gt;
  &lt;/TechnicalProfile&gt;
  </code></pre>