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.