Microsoft图形位置api在图形客户端中未显示为方法

问题描述 投票:0回答:2

我是Microsoft图形API的新手,并尝试使用graphClient使用“列出位置” API。无法找到graphClient的任何place方法,如下面的Microsoft文档中所示:

https://docs.microsoft.com/en-us/graph/api/place-list?view=graph-rest-1.0&tabs=java

IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();

IRoomCollectionPage microsoft.graph.room = graphClient.places().microsoft.graph.room()
    .buildRequest()
    .get();

这是我的代码(无法看到为graphClient对象创建的places()方法:]

AuthProvider authProvider = new AuthProvider(getTokenUsingGraphClientSecret());
            graphClient = GraphServiceClient.builder().authenticationProvider(authProvider)
                    .buildClient();

令牌代码:

IClientCredential credential = ClientCredentialFactory.createFromSecret(CLIENT_SECRET);
             ConfidentialClientApplication cca =
                     ConfidentialClientApplication
                             .builder(CLIENT_ID, credential)
                             .authority(AUTHORITY)
                             //.setTokenCacheAccessAspect(tokenCacheAspect)
                             .build();

IAuthenticationResult result = cca.acquireToken(parameters).join();

而且,也没有导入IRoomCollectionPage类的选项。

注意:我在build.gradle中使用以下依赖项:

    compile group: 'com.microsoft.graph', name: 'microsoft-graph', version: '1.7.1'
    // https://mvnrepository.com/artifact/com.microsoft.azure/msal4j
    compile group: 'com.microsoft.azure', name: 'msal4j', version: '1.5.0'

[如果我在这里想念什么,请告诉我。预先感谢。

java microsoft-graph microsoft-graph-sdks microsoft-graph-teams microsoft-graph-calendar
2个回答
0
投票

我发现了同一件事。我对这个问题也很感兴趣。为什么要有关于类和方法调用的文档以及不包含这些类的库?


0
投票

您看到此内容的原因分为两个部分:

  1. 我们已经有一段时间没有生成客户了。客户端缺少这些API。我们正在为此进行工作。
  2. 我们生成代码示例。代码示例在客户端之前。

很抱歉造成混乱。我将在发布此文章时对其进行更新。

© www.soinside.com 2019 - 2024. All rights reserved.