Your not going to be able to run that from the client. Part of the CORS setup requires that microsoftonline.com adds your domain to their CORS supported whitelist.
I would suggest that you make a call a service on your server, which then makes the request server to server.
More Related Contents:
- How does Access-Control-Allow-Origin header work?
- “Cross origin requests are only supported for HTTP.” error when loading a local file
- How to enable CORS in AngularJs
- Trying to use fetch and pass in mode: no-cors
- Origin null is not allowed by Access-Control-Allow-Origin
- Response to preflight request doesn’t pass access control check
- CORS Error: “requests are only supported for protocol schemes: http…” etc
- Handle response – SyntaxError: Unexpected end of input when using mode: ‘no-cors’
- Error when accessing API with fetch while setting mode to ‘no-cors’ [duplicate]
- Cross-Origin Read Blocking (CORB)
- Why am I seeing an “origin is not allowed by Access-Control-Allow-Origin” error here? [duplicate]
- How do CORS and Access-Control-Allow-Headers work?
- Is CORS a secure way to do cross-domain AJAX requests?
- fetch() unexpected end of input
- ‘Access-Control-Allow-Origin’ issue when API call made from React (Isomorphic app)
- Cannot access cssRules from local css file in Chrome 64
- Javascript – No ‘Access-Control-Allow-Origin’ header is present on the requested resource
- Uncaught (in promise) TypeError: Failed to fetch and Cors error
- Cross-origin resource sharing (CORS) concept
- CORS cookie credentials from mobile WebView loaded locally with file://
- CORS not working on Chrome
- Javascript module not working in browser?
- CORS: credentials mode is ‘include’
- AngularJS CORS Issues
- CORS error for application running from file:// scheme
- Cannot load Deezer API resources from localhost with the Fetch API
- How does the ‘Access-Control-Allow-Origin’ header work?
- CSRF protection with CORS Origin header vs. CSRF token
- Empty body in fetch POST request
- Access from origin ‘https://example.com’ has been blocked even though I’ve allowed https://example.com/