Getting CORS ERROR graph api

Divyansh 20 Reputation points
2023-04-10T10:57:23.5+00:00

Hi

I am trying to download file using Graph API. Getting CORS error. Can anyone help to resolve this issue.
User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,302 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shivam Dhiman 6,076 Reputation points
    2023-04-10T11:10:03.5966667+00:00

    Hi @divyansh

    Thanks for reaching out!

    As you are trying to use Download a file graph API in Graph Explorer, for this API the response content is not available in Graph Explorer due to CORS (Cross-Origin Resource Sharing) policy. You can execute this same endpoint/request in an API client, like Postman and it will work as expected.

    Refer this to know about CORS.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.