microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

UserSimulationDetailsCollectionResponse missing after 5.27.0-preview

Open
#2,524 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

The UserSimulationDetailsCollectionResponse class is missing in the C# library after 5.27.0-preview (5.27.0-preview is the last version that the class exists). This means that you cannot page UserSimulationDetails objects anymore.

Expected behavior

UserSimulationDetailsCollectionResponse should exist to enable paging UserSimulationDetails objects.

How to reproduce

This code works in 5.27.0-preview, but won't work after.

        var requestInformation =
            GraphClient.Security.AttackSimulation.Simulations[SimulationId].ToGetRequestInformation();

        requestInformation.URI = new Uri(requestInformation.URI.ToString() + "/report/simulationUsers");
        requestInformation.QueryParameters["Top"] = 1000;

        var results = await GraphClient.RequestAdapter.SendAsync<UserSimulationDetailsCollectionResponse>(requestInformation, UserSimulationDetailsCollectionResponse.CreateFromDiscriminatorValue);

        var pageIterator = Microsoft.Graph.PageIterator<UserSimulationDetails,UserSimulationDetailsCollectionResponse>
            .CreatePageIterator(GraphClient, results, async (userSimDetail) => {}
SDK Version

5.28.0

Latest version known to work for scenario above?

5.27.0

Known Workarounds

Dumped the class out of the 5.27.0 library and make a local copy of it.

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

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 by comparing the generated UserSimulationDetailsCollectionResponse type and related UserSimulationDetails paging models between SDK versions 5.27.0-preview and 5.28.0. Trace the request path through GraphClient.Security.AttackSimulation.Simulations and the /report/simulationUsers endpoint. Done means the response type is available again and the supplied SendAsync and PageIterator example works.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.