I cannot view/see my files which i have uploaded to SharePoint Online using Microsoft.Graph api

Ingo Neufert (MARINGO Computers) 30 Reputation points
2023-08-22T14:31:56.8233333+00:00

With my AzureApp (ClientID) I am able to create folders in the drive and upload a file in the created folder.

In my App I can see, access and download the file. [/drives/{drive-id}/items/{itemid}

In the Share Point Online Browser logged in as the site owner: I can see all folders, but not the files.

When I call in the app /drives/{drive-id}/items/{itemid} I get also the "webUrl" property. When I open this in a browser an empty page is shown (404). (file type is PDF, should show the file).

When I call /drives/{drive-id}/items/{itemid}/permissions I do see the owner with "grantedTo" and "grantedToV2"

{
      "id": "aTowIy5mfG1lbWJlcnNoaxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "roles": [
        "owner"
      ],
      "shareId": "aTowIy5mfG1lbWJlcnNoaXB8bxxxxxxxxxxxxxxxxx",
      "grantedToV2": {
        "user": {
          "@odata.type": "#microsoft.graph.sharePointIdentity",
          "displayName": "Ingo yyy (Admin)",
          "email": "******@xxxxxx.onmicrosoft.com",
          "id": "69a7c4d5-abf4-4187-b241-xxxxxxxx"
        },
        "siteUser": {
          "displayName": "Ingo yyy(Admin)",
          "email": "******@xxxx.onmicrosoft.com",
          "id": "17",
          "loginName": "i:0#.f|membership|******@xxxxx.onmicrosoft.com"
        }
      },
      "grantedTo": {
        "user": {
          "displayName": "Ingo yyy(Admin)",
          "email": "******@xxx.onmicrosoft.com",
          "id": "69a7c4d5-abf4-4187-b241-xxxxx"
        }
      },
      "inheritedFrom": {}
    }

I would understand with an permission error, then I wold expect not seeing the folder and the files. But strange, I can see the folders (created via MS Graph) but not the file?

Thanks for your help

Ingo, from Cologne Germany

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,148 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,231 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 39,281 Reputation points Microsoft Vendor
    2023-08-23T03:23:41.96+00:00

    Hi @Ingo Neufert (MARINGO Computers),

    Per my test, this might be caused by the file was checked out when it was uploaded. And there is no checked in version in sharepoint so the site owner unable to view the file. You can manage the file in library setting and click Manage files which have no checked in version

    User's image

    And you can set files checked in as default in Versioning settings. Then the file will not be checked out when uploading.

    User's image

    User's image


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    4 people found this answer helpful.

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.