У меня возникли некоторые проблемы с элементами Graph Drive. Я пытаюсь получить доступ к файлу с определенной структурой для чтения, записи и обновления файлов в папке. Дело в том, что я не могу получить доступ к карте ведущих папок, я пробовал разные возможности в C # и Graph Explorer.
Структура папок ► MySite.sharepoint.com ► MyUnderSite ► MainDriveFlder ► CustomerDriveFolder ►Driveitems
и
MySite ► MyUnderSite ► MainDriveFlder ► DriveItems
MySite = Сайты / CustomerSitename.sharepoint.com:MyUnderSite = Сайты / CustomerSitename.sharepoint.com: / sites / CustomerSitename2:MainDriveFlder = Customer_FilesCustomerDriveFolder = CustomerNr1_FilesDriveitems = word.docs или pic.png или exel.xlsx
Что я пробовал
В C #
graphserviceClient.Sites["MySite.sharepoint.com:/sites/MyUnderSite:"].Drives.Request().GetAsync();
graphserviceClient.Sites["MySite.sharepoint.com:/sites/MyUnderSite:"].Drives[""].Request().GetAsync();
https://graph.microsoft.com/v1.0/drives/{drive-id}/root/children
graphserviceClient.Sites["MySite.sharepoint.com:/sites/MyUnderSite:"].Drives["Customer_Files"].Root.Children.Request().GetAsync();
https://graph.microsoft.com/v1.0/sites/{tenant}.sharepoint.com:{path-to-site(ie: / сайты / HR)}: / диски
graphserviceClient.Sites["MySite.sharepoint.com:/sites/MyUnderSite:"].Drives.Request().GetAsync();
https://graph.microsoft.com/v1.0/drives/{drive-id}/root:/{folder-name}/{file-name.txt}:/content
graphserviceClient.Sites["MySite.sharepoint.com:/sites/MyUnderSite:"].Drives["Customer_Files"].Items["ID"].Request().GetAsync();
https://graph.microsoft.com/v1.0/drives/{drive-id}/root:/{folder-name}:/children https://graph.microsoft.com/v1.0/me/drive/root/children
Graph Explorer Это работает, я получаю ответ https://graph.microsoft.com/v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives
Затем я получаю ответ с именем файла = "name": "Customer_Files", то есть "driveType": "documentLibrary"
Но когда я захожу дальше в эту папку или хочу вызвать из нее элементы, я не могу получить к ним доступ, C # та же проблема. Я пробовал все это и не отвечал на ошибки, хотя не указал правильную спецификацию URL (часть того, что я пробовал)
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/items/Testfiledrive
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/items/customer_files
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/items/customer
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/items/Customer
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer_Files
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/'Customer_Files'
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/"Customer_Files"
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/{Customer_Files}
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer_Files:
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer_Files
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer:
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer_Files Export
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/root
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/root/search(q='Customer_Files')
GET /v1.0/me/drive/root/search(q='Customer_files')
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/special/documents
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Documents
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/Documents
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/Documents
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/Shared%20Documents
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Shared%20Documents
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer_Files:/root/children
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer_Files/root/children
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/items/Customer_files/children
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/items/Customer_files
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer_files/items
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer_files:
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/root
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/b!iDg2xo9-yUSnkkcTcFXBP_aUL9EMu9JIqr1aGCz8KH9m3E7rhgkqRLyqeK93F96_
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer_Files:
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives/Customer_Files
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drives
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/root
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/list
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/items
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/items/
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/items/Customer_Files
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:/drive/items
GET /v1.0/sites/MySite.sharepoint.com:/sites/MyUnderSite:
GET /v1.0/me/drive/root/children
GET /v1.0/me/drives/Customer_files
Так что основная проблема в том, что я не могу получить доступ или вызвать файлы в Customer_Files и вCustomer_Files / Customernr1_Files.
Может кто-нибудь помочь мне найти правильную структуру в C # и графическом проводнике. Для доступа к этим файлам. Если я предоставил неправильную или меньшую информацию, дайте мне знать. Я искал несколько недель.
Я не могу дать всю информацию и изменить некоторые кодовые имена, чтобы защитить клиента.