0

I am setting up a b2c portal for our a customer facing web application. and we use only local accounts and use a number(username) to login. There is no sign up or any social logins. We provision the local Azure AD accounts using Graph API.

We created a custom policy(we need to use custom policy as we need to perform some api calls in the user journey at some point) using the sample pack from microsoft LocalAccounts Only. and modified it to use usernames to login as mentioned here (Custom B2C Policy for Username based Local Accounts). The policies were uploaded successfully. When I tried to test the signin policy, I get a " Invalid username or password." error. We use app insights for logging.

app insight log:
      ""Exception"": {
        ""Kind"": ""Handled"",
        ""HResult"": ""80131500"",
        ""Message"": ""Invalid username or password."",
        ""Data"": {
          ""IsPolicySpecificError"": false

Signin Log: Status
Failure Sign-in error code
500011 Failure reason
Other

Both Sign in and Profile edit is throwing the same error. What am I missing here to get the local authentication right? Please help.

Dulaj Kulathunga
  • 1,248
  • 2
  • 9
  • 19
  • Hi @Jerry. Can you confirm that you have [added the application IDs](https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-get-started-custom#add-application-ids-to-the-custom-policy) to your **TrustFrameworkExtensions.xml** file? This is a common cause for this sign-in error. – Chris Padgett Oct 03 '19 at 10:12
  • Hi @ChrisPadgett, I thought I did! Thanks for the pointer. I updated the metadata items, but missed out the inputclaim resource id. Once I corrected that, it works! Thanks a ton for your help! – Jerry Aravinthan Oct 03 '19 at 10:48
  • @ChrisPadgett You can add an answer for this question. – Tony Ju Oct 15 '19 at 03:19

1 Answers1

0

To make the answer visible to others, I'm summarizing the answer shared in comment:

This is a common cause for this sign-in error. Add application IDs to the TrustFrameworkExtensions.xml file will solve this issue.

Tony Ju
  • 14,891
  • 3
  • 17
  • 31