1

I am getting No 'Access-Control-Allow-Origin' header is present on the requested resource while trying to generate token using graph api in Angular 8 Application.

Is there any alternate way to manage this using microsoft-adal-angular6 npm to allow cors cross origins?

Nishant
  • 623
  • 4
  • 10
  • Have you tried this? https://github.com/AzureAD/azure-activedirectory-library-for-js#3-get-an-access-token – Stanley Gong Dec 22 '20 at 06:46
  • Yes, i have tried but while calling Graph API from Angular it throws No 'Access-Control-Allow-Origin' header is present on the requested resource – Harsh Gajjar Dec 22 '20 at 11:03
  • please let us know which sample you are referring – Sruthi J Dec 22 '20 at 20:04
  • I am using this package in angular application => microsoft-adal-angular6 Authentication is working but while calling Microsoft Graph API for token and getmembergroup using token generated from above package, it throws No 'Access-Control-Allow-Origin' header is present on the requested resource in below API https://login.microsoftonline.com/XXXXX/oauth2/v2.0/token – Harsh Gajjar Dec 23 '20 at 03:20
  • can you please share the code of app configuration and graph call – Sruthi J Dec 23 '20 at 14:05

1 Answers1

1

I think this question also has been answered in this post. Let me know if you have any other questions.

Stanley Gong
  • 11,522
  • 1
  • 8
  • 16