Env:开发人员帐户,也称为使用沙盒和通过图形浏览器。
我在更新通过schemaExtensions添加的自定义字段时遇到问题。以下是步骤:
POST https://graph.microsoft.com/v1.0/schemaExtensions
{
"id": {schemaName},
"description": "Meta data",
"targetTypes": [
"Event"
],
"owner": {app_id},
"properties": [
{
"name": "Pid",
"type": "String"
}
]
}
我收到了201的回复:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#schemaExtensions/$entity",
"id": "extiv30x2jc_{schemaName}",
"description": "Meta data",
"targetTypes": [
"Event"
],
"status": "InDevelopment",
"owner": {app_id},
"properties": [
{
"name": "Pid",
"type": "String"
}
]
}
然后,我创建了一个事件,如下所示:
POST https://graph.microsoft.com/v1.0/me/events
{
"subject": "My event",
"start": {
"dateTime": "2021-02-25T22:45:11.110Z",
"timeZone": "UTC"
},
"end": {
"dateTime": "2021-02-25T22:45:11.110Z",
"timeZone": "UTC"
}
}
事件已成功创建,我注意到
身份证件
事件的。然后,我修补了该事件,因为不可能同时创建实例和更新自定义字段。
PATCH https://graph.microsoft.com/v1.0/me/events/{id}
{
"extiv30x2jc_{schemaName}": {
"Pid": "1"
}
}
我得到了如下200条回复:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users({graph_explorer_profile_id})/events/$entity"
}
要搜索事件以查看自定义字段是否已更新,我使用以下命令:
GET https://graph.microsoft.com/v1.0/me/events/{id}
但我找不到自定义字段
Pid
我做错了什么?