Forum Discussion

sanjaychauhan's avatar
sanjaychauhan
Copper Contributor
Nov 27, 2025

Error while creating Graph API Access token

Hi guys,

I am trying to create an access token for calling Graph API through browser.  When I call 'https://login.microsoftonline.com/XXXX-XXXX-XXX-XXX-XXX/oauth2/token' api using AJAX, I receive below error.

Access to XMLHttpRequest at 'https://login.microsoftonline.com/XXXX-XXXX-XXX-XXX-XXX/oauth2/token' from origin 'https://cevalogisticsoffice365.sharepoint.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Please can you provide me why this error is occurring and what is the solution for this. 

Regards

No RepliesBe the first to reply

Resources