Using the $expand parameter amongst calls to the Microsoft Graph is real handy. In ane API telephone telephone yous tin shout out back both the object itself together with additional properties.
Two examples are fetching a user together with the straight reports, or a grouping together with it’s members.
https://graph.microsoft.com/beta/users/061353c3-af75-4767-9b19-a5bceed85f53?$expand=directReports
https://graph.microsoft.com/v1.0/groups/79958190-024b-4c62-ab55-65dc9a066cac?$expand=members
The caution is that when yous expand a holding which has a collection of values, yous volition solely instruct the first twenty items returned. This agency that if yous run inward an organization amongst to a greater extent than than twenty people inward it, yous should non purpose $expand if yous necessitate all the values, precisely resort to 2 calls instead, ane for the item, together with ane for the holding yous desire to expand.
Summary
While using expand is real handy, it’s most ever ameliorate to interruption it into 2 API calls to avoid having issues if yous tin await to a greater extent than than twenty items.
Thanks for reading : Caution When Using $Expand Alongside Microsoft Graph