Handling of Non-Existing Properties in Microsoft Graph -
this category "unexpected behavior" - take following query (you can paste in graph explorer):
https://graph.microsoft.com/v1.0/users?$filter=idc eq 'test'
this returns status code 400 , "property 'idc' not exist declared property or extension property." sensible , understandable response.
now, if try $select property:
https://graph.microsoft.com/v1.0/users?$select=idc
i result totally don't expect:
{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(idc)", "@odata.nextlink": "https://graph.microsoft.com/v1.0/users?$select=idc&$skiptoken=cut", "value": [ {}, {}, ... {} ] }
(a list of empty objects; asking single user invalid property name returns me emtpy response).
so question - why $filter error out , $select not? there way force $select error out too? (eg using /beta endpoint , property name changes - want code fail find out)
sorry late answer. had discussion on , love of thoughts (and thoughts of other developers). don't have clear answer on yet.
there 2 schools of thought here:
- make $select , $filter behave consistently when dealing properties don't exist.
- it's ok these differ in behavior, since caller’s intent when specifying $select different of $filter. service cannot ignore property specified in $filter because changes set of objects returned. however, $select not change set of objects drops properties not available. hence $select , $filter not need consistent.
thoughts?
hope helps,
Comments
Post a Comment