Graph API - Sharepoint - There is no field 'shared' in responses even if a file is shared

adminuser 1 21 Reputation points
2022-10-12T14:40:06.68+00:00

Responses for the requests:

'GET /drives/{drive-id}/root/delta'
'GET /drives/{drive-id}/root'

do not contain the field 'shared' for some files even if they are shared.
E.g. a file has the following permissions (got via GET /sites/{siteId}/drive/items/{itemId}/permissions):

  {  
        "id": "...",  
        "roles": [  
            "write"  
        ],  
        ...  
        "grantedToIdentitiesV2": [  
            {  
                "user": {  
                    "@odata.type": "#microsoft.graph.sharePointIdentity",  
                    "displayName": "adminuser 1",  
                    "email": "adminuser1@...",  
                    "id": "..."  
                },  
                ...  
            }  
        ],  
        "link": {  
            "scope": "organization",  
            "type": "edit",  
            ...  
        }  
    },  

But 'GET /drives/{drive-id}/root' returns no 'shared' field for this item.

I wonder why it works as expected for some files and don't work for others.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,445 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,810 questions
0 comments No comments
{count} votes

Accepted answer
  1. Srinivasa Rao Darna 6,711 Reputation points Microsoft Vendor
    2022-10-12T16:01:06.707+00:00

    Hi @adminuser 1 ,

    As it needs additional troubleshooting, request you to report this by raising a support case a specialized support engineer will assist you better on this.

    You can raise technical support request from
    https://portal.azure.com/#view/Microsoft_Azure_Support/HelpAndSupportBlade/~/overview or https://admin.microsoft.com/#/support/requests.

    Also, there is a similar issue reported: https://github.com/microsoftgraph/microsoft-graph-docs/issues/17418.

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

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful