title: Custom Policy RESTful-Api UserJourney Error
body: <p>I am developing a RESTful Service, which gets called during the Signup/Signin Process in Azure AD B2C. My Service logs state, that data successfully arrives, and output-claims (<code>customerId</code>) get created. </p>
  
  <p>But I receive the following error message, and the user doesn't get created: </p>
  
  <blockquote>
    <p>AADB2C90161 A self-asserted send response has failed with reason (Internal Server Error).
    <br/>Correlation ID 7eac5fd2-cd85-4535-b166-4cc8f0264d07</p>
  </blockquote>
  
  <p>I have oriented myself towards this example: <a href="https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/tree/master/scenarios/aadb2c-ief-rest-api-netfw/" rel="nofollow noreferrer">https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/tree/master/scenarios/aadb2c-ief-rest-api-netfw/</a></p>
  
  <p>Did anyone experience similar issues and has a hint what could be the problem in my case?</p>
  
  <p>in TrustFrameworkExtension: </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ClaimsProvider&gt;
    &lt;DisplayName&gt;KTM REST APIs&lt;/DisplayName&gt;
    &lt;TechnicalProfiles&gt;
      &lt;TechnicalProfile Id="REST-API-SignUp"&gt;
        &lt;DisplayName&gt;Generate and return customerID claim&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://&lt;my.service.com&gt;/api/Identity/Signup&lt;/Item&gt;
          &lt;Item Key="AuthenticationType"&gt;None&lt;/Item&gt;
          &lt;Item Key="SendClaimsIn"&gt;Body&lt;/Item&gt;
        &lt;/Metadata&gt;
  
        &lt;InputClaims&gt;          
          &lt;InputClaim ClaimTypeReferenceId="email" PartnerClaimType="Email" /&gt;
          &lt;InputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="FirstName" /&gt;
          &lt;InputClaim ClaimTypeReferenceId="surname" PartnerClaimType="LastName" /&gt;
          &lt;InputClaim ClaimTypeReferenceId="testClaim" PartnerClaimType="ObjectId" /&gt;           
        &lt;/InputClaims&gt;
        &lt;OutputClaims&gt;
          &lt;OutputClaim ClaimTypeReferenceId="customerId" PartnerClaimType="CustomerId" /&gt;
        &lt;/OutputClaims&gt;
        &lt;UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" /&gt;
      &lt;/TechnicalProfile&gt;
  
      &lt;TechnicalProfile Id="LocalAccountSignUpWithLogonEmail"&gt;
        &lt;OutputClaims&gt;
          &lt;OutputClaim ClaimTypeReferenceId="customerId" PartnerClaimType="CustomerId" /&gt;
        &lt;/OutputClaims&gt;
        &lt;ValidationTechnicalProfiles&gt;
          &lt;ValidationTechnicalProfile ReferenceId="REST-API-SignUp" /&gt;
        &lt;/ValidationTechnicalProfiles&gt;
      &lt;/TechnicalProfile&gt;
    &lt;/TechnicalProfiles&gt;
  &lt;/ClaimsProvider&gt;
  </code></pre>