samples icon indicating copy to clipboard operation
samples copied to clipboard

Error "Invalid username or password."

Open Andriy-Liulka opened this issue 3 years ago • 11 comments
trafficstars

I uploaded all required files to Identity Experience Framework and after attempt to runing B2C_1A_DEMO_PASSWORDRESET_NOTLASTPASSWORD file it opens properly. But after entering email address and verification it,I tried to fill oldPassword, newPassword and reenterPassword with completely the same values and have got next error:

image After entering other password in second and third field I still got same error: image Could you please provide me some information why it could happened.

Andriy-Liulka avatar May 25 '22 11:05 Andriy-Liulka

maybe you can refer the issue: https://github.com/azure-ad-b2c/samples/issues/407 and the issue: https://github.com/azure-ad-b2c/samples/issues/411.

  1. use microsoft edge to inspect the web console of network tab to check if there are some script error.( not chrome, use edge.)
  2. add application insight to get more log information
  3. check the configuration about endpoint and application Id and so on.

huqianghui avatar May 25 '22 12:05 huqianghui

Thanks,I checked console issue and it is the same as in ticket #407 : [Report Only] Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'strict-dynamic' 'self' 'nonce-9is4PtajhyitYm6uYX0Tkw==' 'report-sample'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.

Andriy-Liulka avatar May 25 '22 12:05 Andriy-Liulka

then add the below configuration can resovle the issue.

<RelyingParty>
    <DefaultUserJourney ReferenceId="SignUpOrSignInMFAOption" />
    <UserJourneyBehaviors>
      <ScriptExecution>Allow</ScriptExecution>
    </UserJourneyBehaviors>
<RelyingParty>

You can refer the document: https://docs.microsoft.com/en-us/azure/active-directory-b2c/javascript-and-page-layout?pivots=b2c-custom-policy

huqianghui avatar May 25 '22 13:05 huqianghui

Thanks,error with JavaScript was fixed,but error with User validation still the same ( image

Andriy-Liulka avatar May 25 '22 13:05 Andriy-Liulka

please follow the up step 2 and 3. 2. add application insight to get more log information 3. check the configuration about endpoint and application Id and so on.

huqianghui avatar May 25 '22 13:05 huqianghui

@huqianghui Thanks for help, I will try to research this problem with application insight.

Andriy-Liulka avatar May 26 '22 13:05 Andriy-Liulka

@Andriy-Liulka are you able to fix the issue ? I am facing same issue in custom change password police.

geekdiv avatar Oct 12 '22 13:10 geekdiv

If you have this error in user sign-in logs: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.

image

Double check you have the IDs set right, I had them vice versa (client_id must be the ProxyIdentityExperienceFramework): image

jpalo avatar Nov 14 '22 13:11 jpalo

@Andriy-Liulka / Besides the answer of @jpalo, please check all the steps top to bottom again, or re do it, probably you are missing a step or changed something. In my case I created the app registrations for Proxy/IdentityExperienceFramework with "Accounts in any identity provider or organizational directory (for authenticating users with user flows)". So check again to see what you missed. Good luck.

SilviuMihai avatar Dec 01 '22 11:12 SilviuMihai

@Andriy-Liulka are you able to fix the issue ? I am facing same issue in custom change password police.

hi were you able to resolve this issue

rdhaundiyalf5 avatar Sep 08 '23 11:09 rdhaundiyalf5