microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

Filtering based on subType `DeviceAppManagement.MobileApps.GraphWin32LobApp`

Open
#2,307 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug: metadata OpenApi
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

Describe the bug
Not really a bug I guess more wrong expectations. I would expect that DeviceAppManagement.MobileApps.GraphWin32LobApp would have a GetAsync(...) method that would request all mobile apps of that type.

To Reproduce
Steps to reproduce the behavior:

  1. Create GraphServiceClient
  2. Try to load all Win32LobApps
  3. Fail miserably

Expected behavior
I expected that the Type cast to GraphWin32LobApp would also set the required filter on the mobileApps.

If you want to get all Win32LobApps, you would need to do:

graphServiceClient.DeviceAppManagement.MobileApps.GetAsync((config) => {
    config.QueryParameters.Filter = "isof('microsoft.graph.win32LobApp')";
    ...
});

And then cast the results (if any) to the desired type.

I would expect this to be available in the SDK as DeviceAppManagement.MobileApps.GraphWin32LobApp.GetAsync(...)

Additional context

This is not specific for just this type. There is a lot of Type casting going on and I'm hoping for a solution for all those cases.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with GraphServiceClient.DeviceAppManagement.MobileApps.GetAsync and the GraphWin32LobApp access pattern described in the issue. Investigate how subtype casts and the mobileApps filter are represented in the SDK, then define what consistent typed retrieval should look like across the other casting cases before validating the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.