microsoftgraph / msgraph-metadata

Microsoft Graph metadata captured and used for generating client library code files.
https://graph.microsoft.com
MIT License
105 stars 33 forks source link

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

Open Borgquite opened 7 months ago

Borgquite commented 7 months ago

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 commented 7 months ago

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