Giter Site home page Giter Site logo

azure-samples / ms-identity-docs-code-javascript Goto Github PK

View Code? Open in Web Editor NEW
20.0 15.0 17.0 3.01 MB

Source for the JavaScript & TypeScript code snippets in the Microsoft identity platform documentation found on https://docs.microsoft.com.

Home Page: https://docs.microsoft.com/azure/active-directory/develop

License: MIT License

JavaScript 63.56% TypeScript 20.48% HTML 13.85% CSS 2.11%
microsoft-identity-platform msal-js msal-node msal-react msal-angular samples msal

ms-identity-docs-code-javascript's Issues

BrowserAuthError: monitor_window_timeout in react-spa example application

Please provide us with the following information:

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

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

Minimal steps to reproduce

When the project (react-spa) is ready to be debugged, start the application (e.g. debug in Visual Studio 2022). And as the application has started up then:

  1. Sign in as a user
  2. Wait until the refresh token expires.
  3. Use the 'Request Token'- button to call Microsoft Graph.
  4. As the result the problem may or may not occur.

Any log messages given by the failure

BrowserAuthError.ts:351 Uncaught (in promise) BrowserAuthError: monitor_window_timeout: Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors
at createBrowserAuthError (BrowserAuthError.ts:351:1)
at SilentHandler.ts:92:1
createBrowserAuthError @ BrowserAuthError.ts:351

Expected/desired behavior

After http 400 error a new token would be successfully be fetched in iFrame.

Or this particular application may work correctly if it returns:
:3000/#error=interaction_required&error_description=Session+information+is+not+sufficient+for+single-sign-on.

(InteractionRequiredAuthError: interaction_required: Session information is not sufficient for single-sign-on.)

OS and Version?

Windows 10,

Versions

Mention any other details that might be useful

The 'BrowserAuthError: monitor_window_timeout' does not necessarily occur every time the refresh token has expired. It may also work as expected.

I did save a log when the case was present: the first time it was the monitor_window_timeout that occurred. The second time the refresh token probably was correctly fetched as InteractionRequiredAuthError occurred. I tested this application due to I have used the similar approach to call APIs in my own React project. monitor_window_timeout is often occurring and I tried to run the most simple application with this approach to see is the problem is present.


Thanks! We'll be in touch soon.

protected-api-access-protected-api - sample call returning 404

Please provide us with the following information:

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

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

Minimal steps to reproduce

Follow the Readme for sample "protected-api-access-protected-api"

Any log messages given by the failure

unable to get a response to

http://localhost:8080/me with an Authorization header of Bearer {VALID-ACCESS-TOKEN}.

The Bearer {VALID-ACCESS-TOKEN}has permissions (scp: User_impersonation)

Expected/desired behavior

The api should return user info

OS and Version?

Windows11.

Versions

Mention any other details that might be useful

I have asked a question here - https://learn.microsoft.com/en-us/answers/questions/1344784/on-behalf-of-flow-configuration-web-app-calls-web?page=1&orderby=helpful&comment=answer-1300064

and got a little ahead, But sample is still not working

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.