“No 'Access-Control-Allow-Origin' header is present” for redirected request to https://login.microsoftonline.com/

后端 未结 3 1596
你的背包
你的背包 2020-12-07 05:51

I\'m trying to get response with an access code and getting:

XMLHttpRequest cannot load \"h...://login.microsoftonline.com/d331431b-899c-4666-8094-e82

3条回答
  •  Happy的楠姐
    2020-12-07 06:22

    As mythz explained in his answer, CORS is not allowed from your originating domain. You are, however, allowed to register your application with Microsoft Azure(?) Active Directory so that it can display a separate login dialog that will return a callback to your application as soon as authentication succeeds.

    For more information about the AAD login flow (mind you, this is a NodeJS example, not bare javascript, but the same logic applies) check out Getting started with Azure AD.

提交回复
热议问题