azure - Graph API 过期订阅仍然可以从订阅列表中检索
问题描述
我想使用“GET /subscriptions”的订阅列表应该只显示活动订阅,即不包括已过期的订阅。
但是,对于其中过期订阅是订阅列表的一部分的租户之一,我遇到了问题。以下是我刚刚检索到的订阅列表,它们都已过期:
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#subscriptions",
"value": [
{
"id": "45a12267-662d-4997-a5b2-...",
"resource": "/teams/getAllMessages",
"applicationId": "appid...",
"changeType": "created,updated,deleted",
"clientState": null,
"notificationUrl": "https://url.com",
"notificationQueryOptions": null,
"notificationContentType": "application/json",
"lifecycleNotificationUrl": null,
"expirationDateTime": "2021-06-23T08:59:00.0004497Z"
},
{
"id": "44cd97cc-0a17-46a7-b9c0-...",
"resource": "/teams/getAllMessages",
"applicationId": "appid...",
"changeType": "created,updated,deleted",
"clientState": null,
"notificationUrl": "https://url.com",
"notificationQueryOptions": null,
"notificationContentType": "application/json",
"lifecycleNotificationUrl": null,
"expirationDateTime": "2021-06-23T09:59:00.0000472Z"
},
{
"id": "ec91353f-6fc5-428a-9145-...",
"resource": "/teams/getAllMessages",
"applicationId": "appid...",
"changeType": "created,updated,deleted",
"clientState": null,
"notificationUrl": "https://url.com",
"notificationQueryOptions": null,
"notificationContentType": "application/json",
"lifecycleNotificationUrl": null,
"expirationDateTime": "2021-06-23T18:58:59.9998227Z"
},
{
"id": "64947372-832f-405a-99e5-...",
"resource": "/teams/getAllMessages",
"applicationId": "appid...",
"changeType": "created,updated,deleted",
"clientState": null,
"notificationUrl": "https://url.com",
"notificationQueryOptions": null,
"notificationContentType": "application/json",
"lifecycleNotificationUrl": null,
"expirationDateTime": "2021-06-23T22:58:59.9998244Z"
},
{
"id": "62c8d07f-4cc9-4d42-88a1-...",
"resource": "/teams/getAllMessages",
"applicationId": "appid...",
"changeType": "created,updated,deleted",
"clientState": null,
"notificationUrl": "https://url.com",
"notificationQueryOptions": null,
"notificationContentType": "application/json",
"lifecycleNotificationUrl": null,
"expirationDateTime": "2021-06-23T03:59:00.0004433Z"
},
{
"id": "83f06882-600d-42b0-8d20-...",
"resource": "/teams/getAllMessages",
"applicationId": "appid...",
"changeType": "created,updated,deleted",
"clientState": null,
"notificationUrl": "https://url.com",
"notificationQueryOptions": null,
"notificationContentType": "application/json",
"lifecycleNotificationUrl": null,
"expirationDateTime": "2021-06-24T05:58:59.9995389Z"
}
]
}
我无法删除或获取订阅。
DELETE /subscriptions/83f06882-600d-42b0-8d20-...
{
"error": {
"code": "ExtensionError",
"message": "Operation: Delete; Exception: [Status Code: NotFound; Reason: NotFound]",
"innerError": {
"date": "2021-06-30T03:17:01",
"request-id": "27496aff-5e3e-4bda-9184-a2f248cef30f",
"client-request-id": "27496aff-5e3e-4bda-9184-a2f248cef30f"
}
}
}
GET /subscriptions/83f06882-600d-42b0-8d20-...
{
"error": {
"code": "ExtensionError",
"message": "There was an error processing a storage extension.",
"innerError": {
"date": "2021-06-30T03:15:40",
"request-id": "ba9a3046-6a93-4058-ac22-f83dbc4ceed8",
"client-request-id": "ba9a3046-6a93-4058-ac22-f83dbc4ceed8"
}
}
}
How can I remove the expired subscriptions from the list of subscriptions? Thank you!
Updated code to include request-id for the GET/DELETE request.
解决方案
推荐阅读
- android - android Firebase 应用程序已停止
- php - 限制数组成员依赖于不同的数组和计数
- python - Flask webapp从移动图片库上传照片
- snowflake-cloud-data-platform - ON 子句中的聚合函数无效 - 在 Snowflake SQL 中加入数组重叠/数组包含
- php - 我正在尝试添加乌尔都语字体,但它不起作用
- c - 结构、typedef 和 malloc、calloc
- android - ViewPager 中 Fragment 中的 MapView:调用 getMapAsync() 后永远不会调用 onMapReady()
- wso2-am - WSO2 APIM 3.0.0 MB STORE database
- qt - PlaceholderText 无法在 QTextEdit 中显示
- javascript - 如何在滚动时补偿android移动浏览器的隐藏地址栏?如何在所有浏览器中正确测量“vh”?