首页 > 解决方案 > 从 Microsoft Graph API 获取 414 请求 Uri 太长

问题描述

我使用 Microsoft Graph API 列出 Teams 班次。为此,我使用了list shift endpoint。响应可以分页,在我的情况下,有时我会得到一个@odata.nextLink返回我的HTTP 414: Request-Uri Too Long.

有什么我可以做的吗?

标签: pythonhttpmicrosoft-graph-apiodatamicrosoft-graph-teams

解决方案


这是已知问题。

您可以使用 JSON 批处理作为运行这些请求的解决方法,因为冗长的 URL 只是成为请求负载的一部分。

https://docs.microsoft.com/en-us/graph/json-batching#bypassing-url-length-limitations-with-batching

它将太长的 URL 移动到 POST 的正文中。


推荐阅读