/beta/teamwork/devices REST Endpoint - Works on some tenants, but not others

Bill S 1 Reputation point
2022-10-29T01:41:34.203+00:00

This endpoint did work for us about a week ago, but just stopped working this week on our production O365 tenant

GET https://graph.microsoft.com/beta/teamwork/devices  

We have one true production tenant with ~3K devices and 200k+ users and a number of QA and Staging tenants.

This endpoint works fine when targeting any of our Staging or QA tenants,. Obviously using distinct Enterprise App ID/secrets to generate appropriate Auth headers per tenant, but otherwise common code to make the REST call, and it returns without issue in non-production O365 tenants, but produces this error in our production environment.

Invoke-RestMethod : The remote server returned an error: (500) Internal Server Error.  
At line:1 char:18  
+ ... s_Request = Invoke-RestMethod -Uri $calls_uri -Headers $Header -Metho ...  
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException  
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand  

It is very straightforward call (See below). No issues with permissions as I use the same App for other functions and the tenants were this works have apps that are all configured identically with the appropriate permissions.

$calls_uri ="https://graph.microsoft.com/beta/teamwork/devices"  
$Calls_Request = Invoke-RestMethod -Uri $calls_uri -Headers $Header -Method Get -ContentType "application/json"  

For completeness sake, we have

TeamworkDevice.ReadWrite.All

permission granted for this application

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,121 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 98,516 Reputation points MVP
    2022-10-29T08:00:41.363+00:00

    I'm sure you're well aware of this, but Microsoft does not provide support for any of the /beta endpoints. They're a subject of change and can break at any point. In this case, I believe MS is making some changes in terms of monetizing the endpoint, and it will likely limit them to specific SKUs and/or additional payment options.
    Best talk to your Microsoft account manager to get you into the relevant TAP programs.

    0 comments No comments