Hello,
I am attempting to query users using pagination, sorting by createdDateTime
in descending order. According to the official documentation for Graph API, sorting using advanced query parameters should be supported. However, despite including the necessary parameters in the request, I am still receiving the following error message in the response:
{
"error": {
"code": "Request_UnsupportedQuery",
"message": "Unsupported sort property 'createdDateTime' for 'User'.",
"innerError": {
"date": "2023-12-26T09:17:14",
"request-id": "01ad7d5e-c76f-4c07-a66d-dcbb71ebf674",
"client-request-id": "01ad7d5e-c76f-4c07-a66d-dcbb71ebf674"
}
}
}
And this is the request (in curl)
curl --location 'https://graph.microsoft.com/v1.0/users?%24select=identities%2CbusinessPhones%2CdisplayName%2CgivenName%2CjobTitle%2Cmail%2CmobilePhone%2CpreferredLanguage%2Csurname%2CuserPrincipalName%2Cid%2CcreatedDateTime&%24orderby=createdDateTime%20desc&%24count=true' \
--header 'ConsistencyLevel: eventual' \
--header 'Authorization: Bearer {{token}}'
Does anyone have any suggestions or experience with this issue? Thank you in advance for your help!