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:

  1. make $select , $filter behave consistently when dealing properties don't exist.
  2. 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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -