msgraph-metadata icon indicating copy to clipboard operation
msgraph-metadata copied to clipboard

microsoft.graph.directoryRoleTemplate is missing a filter restrictions annotation.

Open Borgquite opened this issue 1 year ago • 1 comments

Similar to #225, filtering should be restricted on /directoryRoleTemplates (microsoft.graph.directoryRoleTemplate) as the API does not support $filter. For example, both these queries:

https://graph.microsoft.com/v1.0/directoryRoleTemplates?$filter=displayName eq 'Global Administrator'
https://graph.microsoft.com/beta/directoryRoleTemplates?$filter=displayName+eq+'Global+Administrator'

return:

{ "error": { "code": "Request_UnsupportedQuery", "message": "Filtered searches against this resource are not supported.", "innerError": { "date": "2024-04-12T08:59:05", "request-id": "30721130-73b7-4ceb-b260-8b7d96fb59b6", "client-request-id": "30721130-73b7-4ceb-b260-8b7d96fb59b6" } } }

Hopefully the same fix as #225 will do the job

Borgquite avatar Apr 12 '24 09:04 Borgquite

NB It is a 'feature' that DirectoryRoleTemplate cannot be filtered, see documentation: https://learn.microsoft.com/en-us/graph/api/directoryroletemplate-get?view=graph-rest-1.0&tabs=http#optional-query-parameters

Borgquite avatar Apr 12 '24 09:04 Borgquite