問題タブ [microsoft-graph-sdks]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
microsoft-graph-sdks - mailboxUsageDetailsRequest が例外を返す
MSOnline コマンドレットを Microsoft.Graph V1.12.0 に置き換えます。
レポート mailboxUsageDetailsReport = null; IReportRootGetMailboxUsageDetailRequestBuilder メールボックスUsageDetailsRequestBuilder = null; IReportRootGetMailboxUsageDetailRequest mailboxUsageDetailsRequest = null;
mailboxUsageDetailsRequestBuilder = graphServiceClient.Reports.GetMailboxUsageDetail(期間); mailboxUsageDetailsRequest = mailboxUsageDetailsRequestBuilder.Request(); mailboxUsageDetailsReport = await mailboxUsageDetailsRequest.GetAsync();
最後の行はスローします:
Fiddler は、正しいファイル "場所" を含む 302 応答を示しますが、応答の本文には 0 しか含まれていません。
回避策は
HttpRequestMessage hrm = new HttpRequestMessage(HttpMethod.Get, mailboxUsageDetailsRequest.RequestUrl); await graphClient.AuthenticationProvider.AuthenticateRequestAsync(hrm); HttpResponseMessage 応答 = await graphClient.HttpProvider.SendAsync(hrm);