ms-identity-b2c-javascript-spa icon indicating copy to clipboard operation
ms-identity-b2c-javascript-spa copied to clipboard

msal:acquireTokenFailure when editing profile

Open JamesBewley opened this issue 4 years ago • 0 comments

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] question
- [ ] feature request
- [x ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

The app works as expected with the provided test B2C instance fabrikamb2c but when you follow the documentation to create a B2C tennant the edit profile behaviour is broken. I can login successfully and use the app to call the /hello API of the node web api sample.

The problem occurs when using the "Edit Profile" button which launches a pop-up that imeediately dissapears and a generic error is logged as below. The second time the button is pressed, the popup is launched and I am required to login again, after submitting the credentials the pop-up is redirected to correct edit profile screen.

Is some additional config required on the Azure B2C instance that isn't documented?

Any log messages given by the failure

@azure/[email protected] : Info - Emitting event: msal:acquireTokenFailure
@azure/[email protected] : Info - BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: eyJpZCI6IjY1NjE0ZTVkLTgzZjctNDQ4Ny04NzY5LWU0ZDhlZWM4YjljNiIsIm1ldGEiOnsiaW50ZXJhY3Rpb25UeXBlIjoicG9wdXAifX0
ServerError: server_error: AADB2C: An exception has occurred.
Correlation ID: 76f9204f-9119-4b2b-ac4f-f390ddaeb89e
Timestamp: 2021-10-05 14:36:14Z

    at ServerError.AuthError [as constructor] (index.es.js:422)
    at new ServerError (index.es.js:2778)
    at ResponseHandler.validateServerAuthorizationCodeResponse (index.es.js:4162)
    at AuthorizationCodeClient.handleFragmentResponse (index.es.js:4458)
    at PopupHandler.<anonymous> (InteractionHandler.ts:49)
    at step (msal-browser.js:81)
    at Object.next (msal-browser.js:62)
    at msal-browser.js:55
    at new Promise (<anonymous>)
    at __awaiter (msal-browser.js:51)

Expected/desired behavior

The same behaviour as the test B2C

Browser and version?

Chrome 94

Versions

Current main

Mention any other details that might be useful

JamesBewley avatar Oct 05 '21 14:10 JamesBewley