大网数据广告活动
启动与系统组件

Remove Windows 365 Business Cloud PCs from Grace with Graph Explorer and Microsoft Graph API

· 52CE 我爱测

Learn how to remove Windows 365 Business Cloud PCs from grace period using Microsoft Graph Explorer and API. Follow this step-by-step guide to resolve issues and reassign licenses.

Summary

When a license is removed from a user, Windows 365 Business Cloud PCs enter a seven-day grace period before permanent removal. This article explains how to manually remove Cloud PCs from grace to reassign licenses and avoid provisioning issues.

This article provides step-by-step instructions for using Microsoft Graph Explorer and the Microsoft Graph API to perform this deprovision.

Note: For most scenarios, administrators can now end the grace period and deprovision Windows 365 Business Cloud PCs directly from the Microsoft 365 admin center or Intune by using the Deprovision now option. This article describes how to perform the same action by using Microsoft Graph and is intended for automation or advanced troubleshooting scenarios.

Prerequisites

  • Administrator access to your Microsoft 365 tenant

  • Permissions to use Microsoft Graph API (Cloud PC administrator or equivalent)

  • Access to Microsoft Graph Explorer

  • Cloud PCs in inGracePeriod status in your Windows 365 environment

Step 1: Sign in to Graph Explorer

  1. Go to Graph Explorer.

  2. Select Sign in to Graph Explorer (top right corner).

  3. Authenticate by using your administrator credentials and set the tenant.

Step 2: Identify Cloud PCs in grace period

  1. In the query box, set the following GET request:

    https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/cloudPCs?$filter=status eq 'inGracePeriod'
    
  2. In Graph Explorer, select Modify Permissions.

  3. Consent to the following permissions for your session:

    • CloudPC.Read.All

    • CloudPC.ReadWrite.All

  4. If not already granted, select Consent to add these permissions.

  5. Select Run Query.

  6. Review the results to locate the Cloud PCs you want to remove. Note the id value for each relevant Cloud PC.

Step 3: Remove a Cloud PC from grace

  1. For each Cloud PC, send a POST request to remove it from grace. In the query box, select POST and use the following request:

    https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/cloudPCs/{cloudPCId}/endGracePeriod
    
  2. Replace {cloudPCId} by using the actual ID of the Cloud PC. For example:

    https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/cloudPCs/4b18de4b-ab05-4059-8c61-0323a7df4ced/endGracePeriod
    
  3. Leave the request body empty.

  4. Select Run Query.

  5. If successful, you receive a No Content - 204 response.

Step 4: Verify removal

  1. To confirm removal from grace, repeat the GET request from Step 3.

  2. The Cloud PC shouldn't appear with status eq 'inGracePeriod'.

Troubleshooting and notes

  • If you receive a permissions error, verify that you have the correct roles and all necessary permissions are consented.

  • Changes made through the Graph API might take a few minutes to reflect in the Windows 365 portal.

  • Removing a Cloud PC from grace permanently deletes the Cloud PC and any associated user data.

More information

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 05/15/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。