Microsoft Graph API - Teamwork Device Configuration expand not working

Andrea Fuggetta 0 Reputation points
2023-08-28T16:24:19.7033333+00:00

Hello,

In short, I need to get a list of all IPPhones in my tenant with their configuration details.

This seems to be only available in the Beta Graph API, so I am aware it is subject to change, nonetheless, I need some clarifications on its usage if possible.

This is my current code snippet:

//... more code
Azure.Identity.ClientSecretCredential clientSecretCredential = new Azure.Identity.ClientSecretCredential(......);

string[] scopes = { "https://graph.microsoft.com/.default" };

GraphServiceClient graphClient = new GraphServiceClient(clientSecretCredential, scopes);

var result = await graphClient.Teamwork.Devices.GetAsync((requestConfiguration) =>
{
	requestConfiguration.QueryParameters.Top = 2; // Works
	requestConfiguration.QueryParameters.Filter = $"deviceType eq '{TeamworkDeviceType.IpPhone}'"; // Works
	// Expand not supported at this time for this endpoint.
});
var configResult = await graphClient.Teamwork.Devices["ID"].Configuration.GetAsync((requestConfiguration) =>
{
	// Select and Expand should work based on Docs
	requestConfiguration.QueryParameters.Select = new string[] { "systemConfiguration" }; // Does not work
	requestConfiguration.QueryParameters.Expand = new string[] { "systemConfiguration" }; // Does not work
});

//... more code


No matter how I try, I can't seem to get the "systemConfiguration" properties back. Whenever I try using the "Expand" in the Configuration endpoint it errors out even though it says it is supported.

Any help would be appreciated.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,248 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,005 questions
{count} votes

1 answer

Sort by: Most helpful
  1. TH-4749-MSFT 3,305 Reputation points
    2023-08-28T20:06:10.06+00:00

    Hi Andrea Fuggetta,

    Thanks for reaching out.

    The systemConfiguration property does not appear to be one of the properties returned by the Teamwork/devices/id call and hence you cannot use select or expand it. For all the Teamwork devices properties please refer to article https://learn.microsoft.com/en-us/graph/api/resources/teamworkdevice?view=graph-rest-beta for more information.

    For any Graph SDK related questions please post them on the respective Graph SDK Github forum. If you are able to produce the issue using Graph Explorer or Postman app please post any beta api issues on the Graph Feedback Forum.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    Thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.