Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserSimulationDetailsCollectionResponse missing after 5.27.0-preview #2524

Open
cammurray opened this issue May 30, 2024 · 6 comments
Open
Labels
dependency:metadata Awaiting fix from core dependency project module type:bug A broken experience

Comments

@cammurray
Copy link

cammurray commented May 30, 2024

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_
@cammurray cammurray added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels May 30, 2024
@andrueastman
Copy link
Member

Thanks for raising this @cammurray

Any chance you can confirm if you are using the beta SDK? If so, is this still an issue with the latest 5.75.0-preview?

@andrueastman andrueastman added Needs: Author Feedback status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned Needs: Author Feedback labels May 30, 2024
@cammurray
Copy link
Author

Thanks for raising this @cammurray

Any chance you can confirm if you are using the beta SDK? If so, is this still an issue with the latest 5.75.0-preview?

Hey @andrueastman

Yep, i'm using the beta SDK and the issue definitely exists on the latest 5.75-0-preview.

@andrueastman
Copy link
Member

This is caused by missing metadata is missing the required path for the model to be generated. Related to metadata issue at microsoftgraph/msgraph-metadata#531

@andrueastman andrueastman added dependency:metadata Awaiting fix from core dependency project module and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels May 31, 2024
@cloudhal
Copy link

cloudhal commented Jul 9, 2024

I have a very similar issue since around 5.48 using PageIterator with UserCollectionResponse, wonder if this is the same issue? Not an issue if I don't have trimming enabled.

@andrueastman
Copy link
Member

I have a very similar issue since around 5.48 using PageIterator with UserCollectionResponse, wonder if this is the same issue? Not an issue if I don't have trimming enabled.

I believe this would be a different issue as the issue here is that the model is not generated in the source due to the input metadata missing it. UserCollectionResponse model however exists in the source at

public class UserCollectionResponse : Microsoft.Graph.Models.BaseCollectionPaginationCountResponse, IParsable

Any chance you can create a separate issue outlining the issue you are facing?

@cloudhal
Copy link

I have a very similar issue since around 5.48 using PageIterator with UserCollectionResponse, wonder if this is the same issue? Not an issue if I don't have trimming enabled.

I believe this would be a different issue as the issue here is that the model is not generated in the source due to the input metadata missing it. UserCollectionResponse model however exists in the source at

public class UserCollectionResponse : Microsoft.Graph.Models.BaseCollectionPaginationCountResponse, IParsable

Any chance you can create a separate issue outlining the issue you are facing?

Yes I can, although just realised it's using .Net 7 so I need to upgrade it, may be why it's not working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency:metadata Awaiting fix from core dependency project module type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

3 participants