Java ITrustFrameworkPolicyCollectionPage“;无法解析为“类型”;
我正在尝试使用图形API获取Java中的“Azure B2C AD TrustFrameworkPolicy”列表 这些是我在POM中的依赖项Java ITrustFrameworkPolicyCollectionPage“;无法解析为“类型”;,java,azure-active-directory,azure-ad-b2c,azure-ad-b2c-custom-policy,azure-sdk,Java,Azure Active Directory,Azure Ad B2c,Azure Ad B2c Custom Policy,Azure Sdk,我正在尝试使用图形API获取Java中的“Azure B2C AD TrustFrameworkPolicy”列表 这些是我在POM中的依赖项 <dependency> <groupId>com.microsoft.graph</groupId> <artifactId>microsoft-graph</artifactId> <version
<dependency>
<groupId>com.microsoft.graph</groupId>
<artifactId>microsoft-graph</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>com.microsoft.graph</groupId>
<artifactId>microsoft-graph-core</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>com.microsoft.graph</groupId>
<artifactId>microsoft-graph-auth</artifactId>
<version>0.2.0</version>
</dependency>
并在图形服务客户端中使用身份验证提供程序
IGraphServiceClient graphClient = GraphServiceClient.builder()
.authenticationProvider(authProvider)
.buildClient();
但是当我使用“ITrustFrameworkPolicyCollectionPage”时,我发现错误->无法解析为类型
ITrustFrameworkPolicyCollectionPage policies = graphClient.trustFramework().policies()
.buildRequest()
.get();
我正在努力寻找我错过的maven依赖,或者我不明白为什么它不起作用。有人请帮忙
URL目前已损坏 而是用这个
ClientCredentialProvider authProvider =
new ClientCredentialProvider(clientId,
scopes,
clientSecret,
b2cTenantId,
endpoint);
OkHttpClient client = HttpClients.createDefault(authProvider);
Request request = new Request.Builder().url("https://graph.microsoft.com/beta/trustFramework/policies/B2C_1A_User_MigrationClients/$value").build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
这将为您提供所需的XML,它只是策略
ClientCredentialProvider authProvider =
new ClientCredentialProvider(clientId,
scopes,
clientSecret,
b2cTenantId,
endpoint);
OkHttpClient client = HttpClients.createDefault(authProvider);
Request request = new Request.Builder().url("https://graph.microsoft.com/beta/trustFramework/policies/B2C_1A_User_MigrationClients/$value").build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());