Unable to get Cloud PCs for a user from Graph beta API

Jake Robson 21 Reputation points
2022-08-12T10:49:36.19+00:00

Describe the bug

I am trying to get a list of Cloud PCs that my user account has access to via the beta Graph API. I am trying in both code and via the Graph API Explorer, however, I am getting the same error on both: Access is denied to the requested resource

Steps to reproduce the behavior:

  1. Go to Microsoft Graph Explorer
  2. Sign in with an account.
  3. Select GET from the dropdown at the top
  4. Select beta from the next dropdown
  5. Put https://graph.microsoft.com/beta/me/cloudPCs into the textbox
  6. Press the Run Query button
  7. At this point you should get the error, however, you may need to accept the permissions via the Modify Permissions tab
  8. If you had to modify permissions then run query again, you should still get the same error.
  9. Expected behavior
  10. A list of Cloud PCs the logged in user has access to show be returned.

230655-image.png

Device

  • OS: Windows 10
  • Browser: Chrome, Firefox, Edge

Additional context

  • I have accepted permissions for all users in the tenant via Azure Active Directory Apps as well and this has not made any difference.
  • I have been trying to do this a couple of times a week for the past month but hasn't yet been patched.
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,646 questions
0 comments No comments
{count} votes

Accepted answer
  1. Srinivasa Rao Darna 6,691 Reputation points Microsoft Vendor
    2022-08-15T16:26:54.743+00:00

    Hi @Jake Robson ,

    Using the Microsoft Graph API for Cloud PCs requires an active Windows 365 license for the organization.
    Currently, Microsoft Graph API is available for Windows 365 Enterprise and not Windows 365 Business.

    Graph APIs for cloudpc-concept-overview are currently in preview and APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

    I tested this me/cloudPCs and was able to fetch them when assigned cloud-pc to the user.
    231137-cloudpc-allocated.png

    And there appears to return access denied when tested against a user when no cloud-pc is assigned. Would expect an empty collection is returned!

    231098-cloudpc-noaccess.png

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful