MSTeams中有一个错误(我认为(当你在Azure中删除一个组时,MSTeams的团队仍然可用。所以我在删除组之前将其存档。
现在我想取消对它的配置并恢复组。这些电话都不起作用。。。
graphApplicationClient.teams({teamId}).unarchive().buildRequest().post();
错误:
Apr. 24, 2020 5:01:55 PM com.microsoft.graph.logger.DefaultLogger logDebug
INFORMATION: Starting to send request, URL https://graph.microsoft.com/v1.0/teams/{teamId}/microsoft.graph.unarchive
Apr. 24, 2020 5:01:55 PM com.microsoft.graph.logger.DefaultLogger logDebug
INFORMATION: Request Method POST
Apr. 24, 2020 5:01:55 PM com.microsoft.graph.logger.DefaultLogger logError
SCHWERWIEGEND: CoreHttpProvider[send] - 204Error during http request
Apr. 24, 2020 5:01:55 PM com.microsoft.graph.logger.DefaultLogger logError
SCHWERWIEGEND: Throwable detail: com.microsoft.graph.core.ClientException: Error during http request
Exception in thread "main" com.microsoft.graph.core.ClientException: Error during http request
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:421)
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:204)
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:184)
at com.microsoft.graph.http.BaseRequest.send(BaseRequest.java:306)
at com.microsoft.graph.requests.extensions.TeamUnarchiveRequest.post(TeamUnarchiveRequest.java:62)
at MSTeamsService.main(MSTeamsService.java:65)
Caused by: java.lang.NullPointerException
at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1770)
at java.base/java.util.regex.Matcher.reset(Matcher.java:416)
at java.base/java.util.regex.Matcher.<init>(Matcher.java:253)
at java.base/java.util.regex.Pattern.matcher(Pattern.java:1134)
at okhttp3.MediaType.get(MediaType.java:53)
at okhttp3.MediaType.parse(MediaType.java:106)
at com.microsoft.graph.http.CoreHttpProvider$3.contentType(CoreHttpProvider.java:346)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:53)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.microsoft.graph.httpcore.TelemetryHandler.intercept(TelemetryHandler.java:35)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.microsoft.graph.httpcore.RedirectHandler.intercept(RedirectHandler.java:123)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.microsoft.graph.httpcore.RetryHandler.intercept(RetryHandler.java:140)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.microsoft.graph.httpcore.AuthenticationHandler.intercept(AuthenticationHandler.java:31)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
at okhttp3.RealCall.execute(RealCall.java:92)
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:355)
... 5 more
另一个电话:
graphApplicationClient.directory().deletedItems({team/groupId}).restore().buildRequest().post();
错误:
Apr. 24, 2020 5:04:14 PM com.microsoft.graph.logger.DefaultLogger logDebug
INFORMATION: Starting to send request, URL https://graph.microsoft.com/v1.0/directory/deletedItems/{team/groupId}/microsoft.graph.restore
Apr. 24, 2020 5:04:14 PM com.microsoft.graph.logger.DefaultLogger logDebug
INFORMATION: Request Method POST
Apr. 24, 2020 5:04:14 PM com.microsoft.graph.logger.DefaultLogger logError
SCHWERWIEGEND: CoreHttpProvider[send] - 204Error during http request
Apr. 24, 2020 5:04:14 PM com.microsoft.graph.logger.DefaultLogger logError
SCHWERWIEGEND: Throwable detail: com.microsoft.graph.core.ClientException: Error during http request
Exception in thread "main" com.microsoft.graph.core.ClientException: Error during http request
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:421)
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:204)
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:184)
at com.microsoft.graph.http.BaseRequest.send(BaseRequest.java:306)
at com.microsoft.graph.requests.extensions.DirectoryObjectRestoreRequest.post(DirectoryObjectRestoreRequest.java:53)
at MSTeamsService.main(MSTeamsService.java:66)
Caused by: java.lang.NullPointerException
at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1770)
at java.base/java.util.regex.Matcher.reset(Matcher.java:416)
at java.base/java.util.regex.Matcher.<init>(Matcher.java:253)
at java.base/java.util.regex.Pattern.matcher(Pattern.java:1134)
at okhttp3.MediaType.get(MediaType.java:53)
at okhttp3.MediaType.parse(MediaType.java:106)
at com.microsoft.graph.http.CoreHttpProvider$3.contentType(CoreHttpProvider.java:346)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:53)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.microsoft.graph.httpcore.TelemetryHandler.intercept(TelemetryHandler.java:35)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.microsoft.graph.httpcore.RedirectHandler.intercept(RedirectHandler.java:123)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.microsoft.graph.httpcore.RetryHandler.intercept(RetryHandler.java:140)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.microsoft.graph.httpcore.AuthenticationHandler.intercept(AuthenticationHandler.java:31)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
at okhttp3.RealCall.execute(RealCall.java:92)
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:355)
... 5 more
(SCHWERWIEGEND意为致命(
如果我在GraphExplorer中尝试这些调用,它们运行良好。。
有人能帮我吗?
致以最良好的问候!
对于所有与I有相同问题的人。GraphAPI提供了customRequest((函数。我使用相同的令牌、相同的url、相同的属性,但使用的是customRequest。
graphApplicationClient.customRequest("/teams/" + pTeamId + "/unarchive").buildRequest().post(new JsonObject());
用于恢复的解决方案相同。。
graphApplicationClient.customRequest("/directory/deletedItems/" + pTeamId + "/restore").buildRequest().post(new JsonObject()
这不是正确的解决方案,因为它应该与普通的GraphAPI一起使用,这就是为什么我不将其标记为答案。但对于每个有同样问题的人来说,这是一种变通方法。。