Microsoft graph api 是否有任何方法可以使用IGraphServiceClient批量删除文件的所有权限?

Microsoft graph api 是否有任何方法可以使用IGraphServiceClient批量删除文件的所有权限?,microsoft-graph-api,microsoft-graph-sdks,microsoft-graph-files,Microsoft Graph Api,Microsoft Graph Sdks,Microsoft Graph Files,作为用户操作的一部分,我们使用MS Graph Java SDK首先列出一个文件的所有权限,然后迭代权限列表以逐个删除每个权限。这似乎有一些性能问题。我们想知道是否有任何方法可以使用IGraphServiceClient批处理调用 使用的相关API: 你可以做 1.创建MSBatch请求步骤(以下示例) Request requestGetMe=new Request.Builder().url(“https://graph.microsoft.com/v1.0/me/build(); L

作为用户操作的一部分,我们使用MS Graph Java SDK首先列出一个文件的所有权限,然后迭代权限列表以逐个删除每个权限。这似乎有一些性能问题。我们想知道是否有任何方法可以使用IGraphServiceClient批处理调用

使用的相关API:

你可以做

1.创建MSBatch请求步骤(以下示例)
Request requestGetMe=new Request.Builder().url(“https://graph.microsoft.com/v1.0/me/build();
List arrayOfDependsOnIdsGetMe=null;
MSBatchRequestStep stepGetMe=新的MSBatchRequestStep(“1”,requestGetMe,ArrayOfDependSonidGetMe);
Request requestGetMePlannerTasks=new Request.Builder().url(“https://graph.microsoft.com/v1.0/me/planner/tasksbuild();
List ArrayOfDependsonidGetMePlannerTasks=Arrays.asList(“1”);
MSBatchRequestStep stepMePlannerTasks=新的MSBatchRequestStep(“2”,requestGetMePlannerTasks,ArrayOfDependsonidGetMePlannerTasks);
String body=“{”+
“\“displayName\”:“我的笔记本”+
"}";
RequestBody postBody=RequestBody.create(MediaType.parse(“application/json”),body);
requestCreateNotebook=新请求
.Builder()
.addHeader(“内容类型”、“应用程序/json”)
.url(“https://graph.microsoft.com/v1.0/me/onenote/notebooks")
.post(postBody)
.build();
MSBatchRequestStep stepCreateNotebook=新的MSBatchRequestStep(“3”,requestCreateNotebook,Arrays.asList(“2”);
2.创建MSBatch请求内容并获取内容
List steps=Arrays.asList(stepGetMe、stepMePlannerTasks、stepCreateNotebook);
MSBatchRequestContent requestContent=新的MSBatchRequestContent(步骤);
String content=requestContent.getBatchRequestContent();
3.调用$batch端点
OkHttpClient=HttpClients.createDefault(auth);
请求批处理请求=新请求
.Builder()
.url(“https://graph.microsoft.com/v1.0/$batch“)
.post(RequestBody.create(MediaType.parse(“application/json”),content))
.build();
Response batchResponse=client.newCall(batchRequest.execute();
4.创建MSBatch响应内容
MSBatchResponseContent responseContent=new MSBatchResponseContent(batchResponse);
Response responseGetMe=responseContent.getResponseById(“1”);
//使用每个请求的响应
您可以制作

1.创建MSBatch请求步骤(以下示例)
Request requestGetMe=new Request.Builder().url(“https://graph.microsoft.com/v1.0/me/build();
List arrayOfDependsOnIdsGetMe=null;
MSBatchRequestStep stepGetMe=新的MSBatchRequestStep(“1”,requestGetMe,ArrayOfDependSonidGetMe);
Request requestGetMePlannerTasks=new Request.Builder().url(“https://graph.microsoft.com/v1.0/me/planner/tasksbuild();
List ArrayOfDependsonidGetMePlannerTasks=Arrays.asList(“1”);
MSBatchRequestStep stepMePlannerTasks=新的MSBatchRequestStep(“2”,requestGetMePlannerTasks,ArrayOfDependsonidGetMePlannerTasks);
String body=“{”+
“\“displayName\”:“我的笔记本”+
"}";
RequestBody postBody=RequestBody.create(MediaType.parse(“application/json”),body);
requestCreateNotebook=新请求
.Builder()
.addHeader(“内容类型”、“应用程序/json”)
.url(“https://graph.microsoft.com/v1.0/me/onenote/notebooks")
.post(postBody)
.build();
MSBatchRequestStep stepCreateNotebook=新的MSBatchRequestStep(“3”,requestCreateNotebook,Arrays.asList(“2”);
2.创建MSBatch请求内容并获取内容
List steps=Arrays.asList(stepGetMe、stepMePlannerTasks、stepCreateNotebook);
MSBatchRequestContent requestContent=新的MSBatchRequestContent(步骤);
String content=requestContent.getBatchRequestContent();
3.调用$batch端点
OkHttpClient=HttpClients.createDefault(auth);
请求批处理请求=新请求
.Builder()
.url(“https://graph.microsoft.com/v1.0/$batch“)
.post(RequestBody.create(MediaType.parse(“application/json”),content))
.build();
Response batchResponse=client.newCall(batchRequest.execute();
4.创建MSBatch响应内容
MSBatchResponseContent responseContent=new MSBatchResponseContent(batchResponse);
Response responseGetMe=responseContent.getResponseById(“1”);
//使用每个请求的响应

有没有办法使用IGraphServiceClient而不是OkHttpClient发出这些批处理请求?@BillCollab应该有。我们在.NET库中添加了对此的支持。我需要验证我们是否也使用JavaOne。尽管如此,OkHttpClient仍将拥有图形中间件来处理节流和身份验证。但是,有没有办法使用IGraphServiceClient而不是OkHttpClient来发出这些批处理请求?@BillCollab应该有。我们在.NET库中添加了对此的支持。我需要验证我们是否也使用JavaOne。尽管如此,OkHttpClient仍将拥有图形中间件来处理节流和身份验证。