How to List All Windows 365 Cloud PCs in Your Tenant Using Microsoft Graph API HTML Blog


How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API! Let’s list them all Microsoft 365 Cloud PCs in Tenant use Microsoft Graphics API. This article shows how to automate the process fetches all Windows 365 Cloud PCs in tenant use Microsoft Graphics API. Let’s learn together and simplify your work by automating as many GUI tasks as possible.

That Microsoft Graphics API provides programmatic access to Cloud PC resources, allows administrators to query information and perform management actions across their organization. These capabilities mirror the operations available through Microsoft Endpoint Manager, but with the added flexibility of automation and integration into custom workflows.

To take advantage of Microsoft Graphics API for PC Cloud, your organization must remain active Windows 365 License. API is supported for both Windows 365 Enterprise And Windows 365 Businessensuring broad applicability across deployment models. In this article, we will learn how automate recording process Windows 365 Cloud PCs in Tenant use Microsoft Graphics API.

With Microsoft Graphicsadministrators can provision and manage Cloud PCs throughout their organization. When combined with Aligned APIsCloud PCs can be managed seamlessly alongside physical endpoints, providing a unified approach to device management.

Windows 365 is your Personal Computer in the Cloud

In today’s dynamic work environment, organizations need robust solutions that strengthen resilience while maximizing return on investment. As IT environment continues to grow, many businesses are turning to cloud-based platform like window 365 to increase security, streamline managementand make sure seamless connectivity.

This study identified several key benefits driving this impact. Increased productivity is a big payoff, with employees and contractors saving minutes per day due to reduced outages and improved latency compared to traditional environments.

Cost savings are also significant, especially through the implementation of a bring-your-own-PC program. By avoiding the purchase, provision, and maintenance of physical laptops, organizations are expected to save costs between the two $1.1 million And $1.2 million for three years.

How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-01
How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-01

In addition to productivity and life cycle savings, organizations realize further efficiencies by reducing IT infrastructure costs. Migrate to window 365 And Azure Virtual Desktops reducing costs associated with on-site operations, with estimated savings ranging between $722,000 to $1.5 million for three years.

By leveraging Microsoft managed services, organizations reduce reliance on extensive local security infrastructure and personnel, resulting in estimated savings of $60,000 to $122,000 for three years.

Know More about Permissions

Access to resources on Microsoft Graphics regulated by permission. As a developerYou must explicitly request and configure appropriate permissions to interact window 365 resource. Always choose the least privileged permission for this FIRE. Use elevated permissions only when necessary for your app’s functionality.

Permission type Least privilege permission Higher privilege permissions
Delegated (work or school account) CloudPC.Read.All CloudPC.ReadWrite.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application CloudPC.Read.All CloudPC.ReadWrite.All
How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Table-01

For additional details about these permissions, see the table above. Microsoft has provided a comprehensive picture, and in many cases, CloudPC.Read.All enough permissions to run this automation. Blessing Microsoft for the table.

How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-02
How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-02

Additionally, your tenant must be active Windows 365 License assigned to the user for successful API operations. This permission allows access to the endpoint for the listing cloud PC, manage lifecycle actions (reboot, resize, rename), and configure provisioning policies.

How to List all Windows 365 Cloud PCs using Microsoft Graph API

Let’s learn how to List all Windows 365 Cloud PCs using Microsoft Graph API. Before continuing, make sure you need it license to call endpoint.

  • Entered into Graph Explorer with your credentials.
  • Click Run the query after typing URLs under. You have to use GET FIRE request method.
https://graph.microsoft.com/v1.0/deviceManagement/virtualEndpoint/cloudPCs
How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-03
How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-03

When you click Run the queryYou will receive a success message with the text ‘OK -200.’ That Response preview the box will display the desired one output.

How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-04
How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-04

Customize Responses with OData Query Parameters

Well, the answer above may not be enough real time automation. In practice, you often need to do this adapt output to take only parameter that are relevant to your scenario. Let me show you how you can optimize Microsoft Graph API response by precisely controlling the returned data.

Rather than fetching all available properties and data, I will simply ask for such properties displayName, imageDisplayName, userPrincipalName, ManageDeviceName etc. You can select any properties you want to display in the response.

https://graph.microsoft.com/v1.0/deviceManagement/virtualEndpoint/cloudPCs?$select=displayName,imageDisplayName,managedDeviceName,userPrincipalName
How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-05
How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-05

PowerShell Script to List all Windows 365 Cloud PCs

The Powershell script below will help you list of all Windows 365 Cloud PCs. This automation requires Microsoft PowerShell Graphics module. The SDK includes two modules, Microsoft. Chart And Microsoft.Graph.Beta, each is called Microsoft Graph REST API v1.0 And Microsoft Graph REST API beta.

Read more : Best Guide to Install Microsoft Graph PowerShell Modules
# Get Cloud PC Data from Microsoft Graph API

# Install Graph module if needed
if (!(Get-Module -ListAvailable Microsoft.Graph.Authentication)) 

{
    Install-Module Microsoft.Graph.Authentication -Force -Scope CurrentUser
}

# Connect to Graph
Connect-MgGraph -Scopes "CloudPC.Read.All"
Write-Host "Connected to Graph successfully"

# Get Cloud PC data
$uri = "

$cloudPCs = Invoke-MgGraphRequest -Uri $uri -Method GET
Write-Host "Found $($cloudPCs.value.Count) Cloud PCs" -ForegroundColor Green

# Display results as table

 if ($cloudPCs.value.Count -gt 0) 
{
    $table = @()
    foreach ($pc in $cloudPCs.value)
     {
        $table += [PSCustomObject]@{
            ManagedDeviceName  = $pc.managedDeviceName
            DisplayName        = $pc.displayName
            ImageDisplayName   = $pc.imageDisplayName
            UserPrincipalName  = $pc.userPrincipalName
        }
    }

    $output = $table | Format-Table -AutoSize

    $output 
} 

else 

{
    Write-Host "No Cloud PCs found." -ForegroundColor Yellow
}



# Disconnect
Disconnect-MgGraph

The final result

To see the final result of automationcopy and paste PowerShell code into both PowerShell ISE or Visual Studio Code, then run the script. Make sure to run it with administrator privilege.

How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API 1
How to List all Windows 365 Cloud PCs in your Tenant using Microsoft Graph API. Figure-06
Download the Script : Get-CloudPCData.ps1

Need More Help or Have a Technical Question?

Join LinkedIN Page And Telegram Group to get step by step guides and latest news updates. Join us Meeting Page to participate in User group meetings. Also, Join WhatsApp Community to get the latest news about Microsoft Technologies. We were there reddit as well.

Author

About the Author: Sujin Nelladath, A Microsoft Graphics MVP with over 11 years of experience in SCCM device management and Automation solutions, writes and shares his experience with Microsoft device management technologies, Azure, DevOps and PowerShell automation

Game Center

Game News

Review Film

Berita Olahraga

Lowongan Kerja

Berita Terkini

Berita Terbaru

Berita Teknologi

Seputar Teknologi

Berita Politik

Resep Masakan

Pendidikan
Berita Terkini
Berita Terkini
Berita Terkini
review anime

Gaming Center

Originally posted 2025-11-30 16:51:02.

Leave a Reply

Your email address will not be published. Required fields are marked *