1
votes

I'm trying to grab only properties "id" and "userPrincipalName" from the teacher when getting educationClasses with $expand=teacher as parameter. But whatever I do, I keep getting the full teacher/user object.

https://graph.microsoft.com/v1.0/education/classes?$expand=teachers($select=id,userPrincipalName)

But it gives the same result as this one:

https://graph.microsoft.com/v1.0/education/classes?$expand=teachers

What am I doing wrong? Or is this one of the endpoints where the expand+select feature is not fully supported? I don't want the full teacher object because it contains assignedLicenses, assignedPlans, provisionedPlans and a whole lot of stuff I will never need in this request.

And...it's production, so I'd like to avoid using the BETA endpoint if possible.

1

1 Answers

0
votes

Yep, looks like the underlying AAD storage doesn't support expand plus select. You can see what is happening under the covers by appending the &$whatif to your query.

Not a lot we can do about this, as the AAD team aren't investing in adding richness here right now.