【发布时间】:2022-01-18 09:27:37
【问题描述】:
我正在使用 C# 包到 Microsoft Graph API。我可以从 Graph API 读取消息。现在我想翻译如下所示的消息 ID: https://docs.microsoft.com/de-de/graph/api/user-translateexchangeids?view=graph-rest-1.0&tabs=csharp
var translatedIds = client.Users[firstMailboxElement.SourcePostbox]
.TranslateExchangeIds(toBeTranslated, ExchangeIdFormat.RestImmutableEntryId, ExchangeIdFormat.RestId)
.Request()
.PostAsync()
.Result;
当我这样做时,我得到以下异常:
System.AggregateException
One or more errors occurred.
(Code: Request_BadRequest Message: Specified HTTP method is not allowed for the request target.
Inner error: AdditionalData: date: 2021-12-15T06:52:45 [...])
这似乎没有意义,因为我无法更改 HTTP 方法。
任何想法如何解决这个问题?
【问题讨论】:
标签: c# asp.net-core microsoft-graph-api