Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint Ms Graph API Onedrive副本返回generalException_Sharepoint_Microsoft Graph Api_Onedrive_Azure Ad Graph Api - Fatal编程技术网

Sharepoint Ms Graph API Onedrive副本返回generalException

Sharepoint Ms Graph API Onedrive副本返回generalException,sharepoint,microsoft-graph-api,onedrive,azure-ad-graph-api,Sharepoint,Microsoft Graph Api,Onedrive,Azure Ad Graph Api,我使用Ms Graph API开发了一个webapp,将文件从sharepoint库复制到其他sharepoint库(全部在线) 我这样调用Graph API副本: POST https://graph.microsoft.com/v1.0/drives/SrcDriveID/items/*SrcDriveItem*/copy?@microsoft.graph.conflictBehavior=replace { "parentReference" : { "driveId": "*Dest

我使用Ms Graph API开发了一个webapp,将文件从sharepoint库复制到其他sharepoint库(全部在线)

我这样调用Graph API副本:

POST https://graph.microsoft.com/v1.0/drives/SrcDriveID/items/*SrcDriveItem*/copy?@microsoft.graph.conflictBehavior=replace

{ "parentReference" :  { "driveId": "*DestDriveID*",  "id": "*DestParentDriveItem*" },  "@microsoft.graph.conflictBehavior":"replace" } }
我收到以下错误:

<Internal Server Error> <{"error": {"code": "generalException","message": "An unspecified error has occurred.","innerError": {"request-id": "0623069a-7071-47f9-be92-48d58902f300","date": "2020-05-06T21:11:07"}}}>

两者都失败了,出现了相同的错误

最后一个给了我:

Copy -<Internal Server Error> <{"error": {"code": "generalException","message": "An unspecified error has occurred.","innerError": {"request-id": "ebf30e17-b4be-4994-bf86-bc3b86834d12","date": "2020-05-09T07:30:42"}}}>
只要设置File.ReadWrite和Files.ReadWrite.All,它就可以与图形API资源管理器一起工作。我将再次检查它们是否应用于我的Web应用程序。 更新 Files.ReadWrite.All权限设置为应用程序,但需要委派。等待改变。
更新上述更改修复的问题

File.readwrite。所有权限均设置为应用程序,但需要委派

File.readwrite.all权限设置为应用程序,但需要委派

你能提供完整的错误信息吗?Hello@CarlZhao,我很乐意提供与该问题相关的任何信息,但在这里我看不到我能提供多少。下面是代码。也许我错过了什么。HttpResponseMessage apiCallResponse=等待apiCallClient.SendAsync(apiRequest);如果(apiCallResponse.StatusCode!=System.Net.HttpStatusCode.Accepted){String requestResponse=wait apiCallResponse.Content.ReadAsStringAsync();_mylog.Warning(“Copy-”;throw new DllNotFoundException();}您能提供完整的错误信息吗?Hello@CarlZhao,我很乐意给出与这个问题相关的任何东西,但在这里我看不到我能给出多少。下面是代码。也许我错过了什么。HttpResponseMessage apiCallResponse=等待apiCallClient.SendAsync(apiRequest);如果(apiCallResponse.StatusCode!=System.Net.HttpStatusCode.Accepted){String requestResponse=wait apiCallResponse.Content.ReadAsStringAsync();_mylog.Warning(“Copy-”);抛出新的DllNotFoundException();}
StringBuilder jsonData = new StringBuilder("{ \"parentReference\" :  { \"driveId\": \"" + DestDriveID + "\",  \"id\": \"" + DestParentDriveItem + "\" },  \"@microsoft.graph.conflictBehavior\":\"replace\",  \"name \":  \"" + DstFileName + "\"  }");
StringBuilder jsonData = new StringBuilder("{ \"parentReference\" :  { \"driveId\": \"" + DestDriveID + "\",  \"id\": \"" + DestParentDriveItem + "\" },  \"@microsoft.graph.conflictBehavior\":\"replace\" }");
Copy -<Internal Server Error> <{"error": {"code": "generalException","message": "An unspecified error has occurred.","innerError": {"request-id": "ebf30e17-b4be-4994-bf86-bc3b86834d12","date": "2020-05-09T07:30:42"}}}>
https://graph.microsoft.com/v1.0/drives/b!fffffffffqv/items/01GEGKyyyyyyuuHR/copy?@microsoft.graph.conflictBehavior=replace
{ "driveId": "b!yyyyy",  "id": "uuuuuu" },  "@microsoft.graph.conflictBehavior":"replace" }