Delay between Get and Post document via api Graph

Diego Pigola 0 Reputation points
2023-03-17T19:51:07.0966667+00:00
Hi everyone!

I´m writing to discuss the problem I am having. Using the java client for api graph, when I query for a file (previously inserted via
this same client) in a sharepoint directory the result is that this file does not exist. This result occurs during the first minutes (approx 5).
After this window of time has passed, the file begins to come as the result of the query.
The suspicion is that there is some kind of session(in the java client), or that there is a certain delay between when the file is inserted and the
query finds it.

Extra data:
    - If i access the sharepoint directory via the graphical interface i can see it instantly when it is inserted.
    - If i insert the file through the graphical interface and query via api. The result is successful in a matter of seconds.
Microsoft Graph SDK
Microsoft Graph SDK
A Microsoft software developer kit designed to simplify building high-quality, efficient, and resilient applications that access Microsoft Graph.
820 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CharanyaB-MSFT 951 Reputation points Microsoft Vendor
    2023-03-20T09:28:00.2233333+00:00

    Hello @Diego Pigola,

    Thanks for reaching out!

    I am not able to replicate the issue locally, the file uploaded to SharePoint is reflecting immediately when querying from graph API. Please try this API from API testing tools like Postman or Graph explorer with necessary permissions.

    Ideally there shouldn't be any delay in querying the files initially (when file is created), but if the issue still persists, I recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from
    http://aad.portal.azure.com/ or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

    If the reply is helpful, please click "Accept Answer" and kindly upvote it. If you have additional questions about this answer, please click "Comment".