Sharepoint newly created document library can not respond graph api for long time.

2025-03-11T05:10:04.4733333+00:00

I'm developing share point upload feature using graph api.

But newly create document library path can't respond graph query for some hours.

After passing some hours, I can get response using same query.

Why it takes time to using graph query for newly created library path?

  1. Log with MS-signing.
  2. In share point site that i can access. create new document library
    1. create new document library "syhtest" url : https://hp.sharepoint.com/teams/HPPK-TEST4/syhtest/Forms/AllItems.aspx
  3. I https://developer.microsoft.com/en-us/graph/graph-explorer site.
    1. execute graph api query to new library path.
    2. post : https://graph.microsoft.com/v1.0/search/query
       {
           "requests": [
               {
                   "entityTypes": [
                       "drive"
                   ],
                   "query": {
                       "queryString": "teams/HPPK-TEST4/syhtest AND Path:\"https://hp.sharepoint.com/teams/HPPK-TEST4/syhtest\""
                   },
                   "fields": [
                       "id",
                       "webUrl",
                       "parentReference"
                   ]
               }
           ]
       }
    
    no hit response
       {
           "value": [
               {
                   "searchTerms": [
                       "teams/HPPK-TEST4/syhtest"
                   ],
                   "hitsContainers": [
                       {
                           "total": 0,
                           "moreResultsAvailable": false
                       }
                   ]
               }
           ],
           "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.searchResponse)"
       }
    
  4. After passing some hours. i can get hit response using same query.
Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Akhil Nasalwai - MSFT 1,690 Reputation points Microsoft External Staff
    2025-03-11T07:03:13.5166667+00:00

    Hello SON, YOUNGHOON (손영훈_SW&Solutions HPPK),

    Thank you for reaching out to Microsoft Support!!

    The delay in getting a response for newly created document libraries when using Microsoft Graph API is likely due to indexing latency in SharePoint. When a new document library is created, it takes some time for the library and its metadata to be indexed by the SharePoint search service. Until the indexing process is complete, the Graph API queries may not return results for the new library.

    Hope this helps.

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

    Was this answer helpful?


Your answer

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