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.
/beta/teamwork/devices REST Endpoint - Works on some tenants, but not others
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
1 answer
Sort by: Most helpful
-
Vasil Michev 111.7K Reputation points MVP
2022-10-29T08:00:41.363+00:00