-
Notifications
You must be signed in to change notification settings - Fork 214
Description
I want to be able to easily retrieve bulk data sets from commands that normally return single data records by using batching.
For example, consider the Get-MgUserManager cmdlet. This cmdlet takes in a single UserId string and retrieves the manager for that user. That's good, but since it only works for a single user, you need to make many calls back and forth to get managers for a set of users, or to get managers for all users in your organization.
JSON batching addresses this problem by allowing you to batch multiple requests into a single call, so that you can get a larger data set in one invocation.
It would be very, very useful if the cmdlets generated using AutoRest had automatic support for JSON batching internally, and supported multiple inputs externally, such that you could invoke Get-MgUserManager and pass in multiple UserId values and internally it would batch the request and pass it along to the back end, returning the entire set of managers that I want in one go. This would make the cmdlets work more like other PowerShell cmdlets do, allowing you to request a single record or an entire dataset depending on what you pass in.
Please consider this enhancement request for the Graph PowerShell module bundle.
AB#7432