命名空间:microsoft.graph
重要
Microsoft Graph /beta 版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
从已删除的项中永久删除最近 删除的目录对象。 支持以下类型:
- application
- agentIdentityBlueprint
- agentIdentity
- agentIdentityBlueprintPrincipal
- agentUser
- certificateBasedAuthPki
- certificateAuthorityDetail
- externalUserProfile
- 组
- pendingExternalUserProfile
- servicePrincipal
- 用户
永久删除某个项后, 无法 还原它。
无法使用deletedItems API 永久删除管理单元。 软删除的管理单元将在初始删除后的 30 天后永久删除,除非它们已还原。
此 API 可用于以下国家级云部署。
| 全局服务 | 美国政府 L4 | 美国政府 L5 (DOD) | 由世纪互联运营的中国 |
|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ |
权限
下表显示了对每种受支持的资源类型调用此 API 所需的最低特权权限。 请遵循 最佳做法 来请求最低特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考。
| 支持的资源 | 委派(工作或学校帐户) | 委派(个人 Microsoft 帐户) | 应用程序 |
|---|---|---|---|
| application | Application.ReadWrite.All | 不支持。 | Application.ReadWrite.OwnedBy |
| agentIdentity | AgentIdentity.DeleteRestore.All | 不支持。 | AgentIdentity.DeleteRestore.All |
| agentIdentityBlueprint | AgentIdentityBlueprint.DeleteRestore.All | 不支持。 | AgentIdentityBlueprint.DeleteRestore.All |
| agentIdentityBlueprintPrincipal | AgentIdentityBlueprintPrincipal.DeleteRestore.All | 不支持。 | AgentIdentityBlueprintPrincipal.DeleteRestore.All |
| agentUser | AgentIdUser.ReadWrite.IdentityParentedBy | 不支持。 | AgentIdUser.ReadWrite.IdentityParentedBy |
| externalUserProfile | ExternalUserProfile.ReadWrite.All | 不支持 | ExternalUserProfile.ReadWrite.All |
| certificateBasedAuthPki | PublicKeyInfrastructure.Read.All | 不支持。 | PublicKeyInfrastructure.Read.All |
| certificateAuthorityDetail | PublicKeyInfrastructure.Read.All | 不支持。 | PublicKeyInfrastructure.Read.All |
| 组 | Group.ReadWrite.All | 不支持。 | 不支持。 |
| pendingExternalUserProfile | PendingExternalUserProfile.ReadWrite.All | 不支持 | PendingExternalUserProfile.ReadWrite.All |
| servicePrincipal | Application.ReadWrite.All | 不支持。 | Application.ReadWrite.OwnedBy |
| user | User.DeleteRestore.All | 不支持。 | User.DeleteRestore.All |
重要
在具有工作或学校帐户的委托方案中,必须为登录用户分配受支持的Microsoft Entra角色或具有支持的角色权限的自定义角色。 此作支持以下最低特权角色。
- 代理标识:代理 ID 管理员
- 管理单元:目录读取器 (只读) 、全局读取者 (只读) 、特权角色管理员
- 应用程序:混合标识管理员、云应用程序管理员、应用程序管理员
- 外部用户配置文件:全局读取者 (只读) 、Skype for Business管理员、Teams 管理员
- 组:组管理员 () 可分配角色的组除外,用户管理员 (角色可分配组) 除外,特权角色管理员 (可分配组的最低特权角色)
- 挂起的外部用户配置文件:全局读取者 (只读) 、Skype for Business管理员、Teams 管理员
- 服务主体:混合标识管理员、云应用程序管理员、应用程序管理员
- 用户:身份验证管理员、特权身份验证管理员、用户管理员。 但是,若要还原具有特权管理员角色的用户,请执行以下作:
HTTP 请求
DELETE /directory/deleteditems/{id}
请求标头
| 名称 | 说明 |
|---|---|
| Authorization | 持有者 {token}。 必填。 详细了解 身份验证和授权。 |
| 接受 | application/json |
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法返回 204 No Content 响应代码。 它不会在响应正文中返回任何内容。
示例
请求
DELETE https://graph.microsoft.com/beta/directory/deleteditems/46cc6179-19d0-473e-97ad-6ff84347bbbb
响应
注意:为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 204 No Content