title: Custom Policies in Azure AD b2c - problems with Claims Provider guide
body: <p>Trying to implement following scenario: implement Azure B2c and azure AD as one of identity providers. Only way to achieve it is using custom policies. I followed those tutorials:
  <a href="https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-get-started-custom#prerequisites" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-get-started-custom#prerequisites</a>
  <a href="https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-setup-commonaad-custom#create-an-azure-ad-b2c-application" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-setup-commonaad-custom#create-an-azure-ad-b2c-application</a>
  The problem is when i trying to upload TrustFrameworkExtensions.xml got info that my tenant</p>
  
  <blockquote>
    <p>makes a reference to ClaimType with id "issuerUserId" but neither the
    policy nor any of its base policies contain such an element.</p>
  </blockquote>
  
  <p>Found similar issue here
  <a href="https://github.com/MicrosoftDocs/azure-docs/issues/27602" rel="nofollow noreferrer">https://github.com/MicrosoftDocs/azure-docs/issues/27602</a>
  and replace issuerUserId by socialIdpUserId. It seems to be solved but during upload another issue came up:</p>
  
  <blockquote>
    <p>makes a reference to ClaimsTransformation with id
    "CreateRandomUPNUserName" but neither the policy nor any of its base
    policies contain such an element.</p>
  </blockquote>
  
  <p>Got claims provider configuration from the tutorial and now i dont really have any idea how to fix it.
  Thanks in advance for any help.</p>
  
  <p>EDIT </p>
  
  <p>Based on @CHris solution i make those files correct (no errors during uploading)
  but there is still some problems with parsing returning token. Has anyone made example from the second link up and running (Azure ad b2c and many azure ad injected in multitentant azure ad).</p>