- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一些代码可以获取或创建 Planner Bucket .
public async Task<PlannerBucket> GetOrCreateBucket(GraphServiceClient graphServiceClient, string planId, string name)
{
var buckets = await graphServiceClient
.Planner
.Plans[planId]
.Buckets
.Request()
.GetAsync();
var bucket = buckets.SingleOrDefault(b => b.Name.Equals(name));
if (bucket == null)
{
bucket = await graphServiceClient
.Planner
.Plans[planId]
.Buckets
.Request()
.AddAsync(new PlannerBucket()
{
Name = name
});
}
return bucket;
}
一年前最初编写这段代码时,我相当确定它工作正常。
早期经常有新的 buckets 并且创建的很好。从那以后创建代码很少被调用,最近调用它时返回错误:
Microsoft.Graph.ServiceException: Code: BadRequest
Message: Write requests are only supported on contained entities
我不太确定这个错误是什么意思。
实体被收容是什么意思?
为什么不包含它?
它甚至意味着哪个实体?
这是否意味着我正在尝试创建的存储桶?
这是否意味着我试图在其中创建它的计划?
这些问题的答案会很好,因为它们可以帮助我理解如何解决问题,但归根结底,真正的问题是:“我做错了什么,我该如何纠正?”。
这是 HTTP 请求:
POST https://graph.microsoft.com/v1.0/planner/plans/__PLANID__/buckets HTTP/1.1
Cache-Control: no-store, no-cache
Connection: Keep-Alive
Content-Type: application/json
Authorization: Bearer __TOKEN__
SdkVersion: Graph-dotnet-1.7.0
x-ms-request-root-id: 309b7fa3-4c57a2db0536dddc
x-ms-request-id: |309b7fa3-4c57a2db0536dddc.2.
Request-Id: |309b7fa3-4c57a2db0536dddc.2.1.
Content-Length: 30
Host: graph.microsoft.com
{"name":"__BUCKETNAME__"}
这是响应:
HTTP/1.1 400 Bad Request
Cache-Control: private
Transfer-Encoding: chunked
Content-Type: application/json
request-id: 5186e2aa-7a1c-4f86-88c4-5542ef89e6c9
client-request-id: 5186e2aa-7a1c-4f86-88c4-5542ef89e6c9
x-ms-ags-diagnostic: __DIAGNOSTICINFO__
Duration: 2.7551
Strict-Transport-Security: max-age=31536000
Date: Thu, 24 Jan 2019 13:08:52 GMT
fb
{
"error": {
"code": "BadRequest",
"message": "Write requests are only supported on contained entities",
"innerError": {
"request-id": "5186e2aa-7a1c-4f86-88c4-5542ef89e6c9",
"date": "2019-01-24T13:08:53"
}
}
}
0
搜索了一下,我认为这个问题已经在 github 上报告过,但目前仍未解决:https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/307
最佳答案
此处的错误消息不是很有用,但问题是我们不允许 POST 到 planner/plans/planid/buckets。您应该将请求发送到 planner/buckets 并在请求正文中包含 planid 属性。文档中的示例是准确的(顺序提示是可选的):https://learn.microsoft.com/en-us/graph/api/planner-post-buckets?view=graph-rest-1.0
关于c# - Microsoft.Graph.GraphServiceClient Planner Buckets AddAsync 返回错误 "Write requests are only supported on contained entities",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54347506/
我已经使用 vue-cli 两个星期了,直到今天一切正常。我在本地建立这个项目。 https://drive.google.com/open?id=0BwGw1zyyKjW7S3RYWXRaX24tQ
您好,我正在尝试使用 python 库 pytesseract 从图像中提取文本。请找到代码: from PIL import Image from pytesseract import image_
我的错误 /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference
我已经训练了一个模型,我正在尝试使用 predict函数但它返回以下错误。 Error in contrasts<-(*tmp*, value = contr.funs[1 + isOF[nn]])
根据Microsoft DataConnectors的信息我想通过 this ODBC driver 创建一个从 PowerBi 到 PostgreSQL 的连接器使用直接查询。我重用了 Micros
我已经为 SoundManagement 创建了一个包,其中有一个扩展 MediaPlayer 的类。我希望全局控制这个变量。这是我的代码: package soundmanagement; impo
我在Heroku上部署了一个应用程序。我正在使用免费服务。 我经常收到以下错误消息。 PG::Error: ERROR: out of memory 如果刷新浏览器,就可以了。但是随后,它又随机发生
我正在运行 LAMP 服务器,这个 .htaccess 给我一个 500 错误。其作用是过滤关键字并重定向到相应的域名。 Options +FollowSymLinks RewriteEngine
我有两个驱动器 A 和 B。使用 python 脚本,我在“A”驱动器中创建一些文件,并运行 powerscript,该脚本以 1 秒的间隔将驱动器 A 中的所有文件复制到驱动器 B。 我在 powe
下面的函数一直返回这个错误信息。我认为可能是 double_precision 字段类型导致了这种情况,我尝试使用 CAST,但要么不是这样,要么我没有做对...帮助? 这是错误: ERROR: i
这个问题已经有答案了: Syntax error due to using a reserved word as a table or column name in MySQL (1 个回答) 已关闭
我的数据库有这个小问题。 我创建了一个表“articoli”,其中包含商品的品牌、型号和价格。 每篇文章都由一个 id (ID_ARTICOLO)` 定义,它是一个自动递增字段。 好吧,现在当我尝试插
我是新来的。我目前正在 DeVry 在线学习中级 C++ 编程。我们正在使用 C++ Primer Plus 这本书,到目前为止我一直做得很好。我的老师最近向我们扔了一个曲线球。我目前的任务是这样的:
这个问题在这里已经有了答案: What is an undefined reference/unresolved external symbol error and how do I fix it?
我的网站中有一段代码有问题;此错误仅发生在 Internet Explorer 7 中。 我没有在这里发布我所有的 HTML/CSS 标记,而是发布了网站的一个版本 here . 如您所见,我在列中有
如果尝试在 USB 设备上构建 node.js 应用程序时在我的树莓派上使用 npm 时遇到一些问题。 package.json 看起来像这样: { "name" : "node-todo",
在 Python 中,您有 None单例,在某些情况下表现得很奇怪: >>> a = None >>> type(a) >>> isinstance(a,None) Traceback (most
这是我的 build.gradle (Module:app) 文件: apply plugin: 'com.android.application' android { compileSdkV
我是 android 的新手,我的项目刚才编译和运行正常,但在我尝试实现抽屉导航后,它给了我这个错误 FAILURE: Build failed with an exception. What wen
谁能解释一下?我想我正在做一些非常愚蠢的事情,并且急切地等待着启蒙。 我得到这个输出: phpversion() == 7.2.25-1+0~20191128.32+debian8~1.gbp108
我是一名优秀的程序员,十分优秀!