Я пытаюсь получить идентификатор файла, используя имя файла в графе API. Я попробовал следующее, но это не работает
https://graph.microsoft.com/v1.0/sites/ccc.sharepoint.com,dddddd,eeeeeeeeeeeeeeee/drive/root:/excelDir/filename.xlsx:/children
Получил ответ
https://graph.microsoft.com/v1.0/sites/"+webAndSiteId+"/drives/"+folderID+"/root/search(q='filename.xlsx')
Ниже рабочий javascript
var fileCollectionEndpoint = "https://graph.microsoft.com/v1.0/sites/"+webAndSiteId+"/drives/"+folderID+"/root/search(q='"+fileNamesArray[index]+"')" $.ajax({ url: fileCollectionEndpoint, async: false, dataType: 'json', type: "GET", cache:false, headers: { 'Authorization':'Bearer '+token, }, success: function (json) { console.log(json.value[0].id); }, error:function(xhr) { } });