I want to sort a file list by lastModifiedDateTime property of the fileSystemInfo property, like this:
https://graph.microsoft.com/v1.0/groups/9e8fd8af-b7fe-4cfe-9b16-81e8358f3bec/drive/root/children?$orderby=fileSystemInfo/lastModifiedDateTime%20desc
I get an 'notSupported' error message from API
Is this supported, or is the syntax wrong?
Yes, i can repro the issue as well. Sounds like filtering by lastModifiedDateTime is not supported for OneDrive for Business. It is supported for OneDrive Personal. The limitation is not specific to the Microsoft Graph endpoint. There is a note about it in the referenced documentation page.
Please refer the older thread - Filtering Onedrive items by lastModifiedDatetime
Related
I want to use the 'List channels' API call to list all channels belonging to a team and also retrieve the 'filesFolder' relationship in a single request. I'm using the code below with the dot net SDK and v1.0 API endpoint.
await graphClient.Teams[team.Id].Channels.Request().Expand("filesFolder").GetAsync();
When this code executes, it causes an exception: "Microsoft.Graph.ServiceException: 'Message: The query specified in the URI is not valid. Query option 'Expand' is not allowed. To allow it, set the 'AllowedQueryOptions' property on EnableQueryAttribute or QueryValidationSettings.",
but the help states that the $expand parameter is supported: https://learn.microsoft.com/en-us/graph/api/channel-list?view=graph-rest-1.0&tabs=http .
I'd like to use the $expand parameter to potentially avoid many extra calls. Is this a bug? Am I doing something wrong?
So I forgot about this question and I eventually contacted Microsoft Support directly. They informed me that the List Channels API method does not support the $expand parameter and that there are no plans to add support for it and that the help page would be corrected. Looks like the help page still hasn't been corrected yet.
I'm trying to make search request for my OneDrive files with some specific extensions. Only solution I've got right now is to filter out after received response but that's not what I'm looking for.
Query I tried:
https://graph.microsoft.com/v1.0/me/drive/root/search(q='book filetype:xlsx OR filetype:xls OR filetype:svg OR filetype:json OR filetype:txt')
Unfortunately it's not returning anything.
AFAIK, the search endpoint will search the keyword like 'book' with all the extensions and give the driveItem objects as response. You need to filter it on your end which extension you like to pick by writing the code. Please raise a feature request in Microsoft Graph Feedback Forum so that the Product team may implement it in future.
I am trying to retrieve all of the files associated with each channel within each Team. Per the Microsoft Graph REST API V1.0 documentation, it is GET /teams/{id}/channels/{id}/filesFolder.\
Please see https://learn.microsoft.com/en-us/graph/api/channel-get-filesfolder?view=graph-rest-1.0&tabs=http
However, filesFolder no longer appears as an available query. Is there still a way to achieve this?
Edit: Appears to be the same for Messages. https://learn.microsoft.com/en-us/graph/api/channel-list-messages?view=graph-rest-beta&tabs=csharp&viewFallbackFrom=graph-rest-1.0
Why are these queries no longer available?
You can query Groups with team-id to get the items from the group's drive directly.
You can use https://graph.microsoft.com/v1.0/groups/{team-id}/drive/root/children where /drive/root can get the Document library that the channel folders are part of and /children can display all items from the folder. Referto this doc for more details on how to get a DriveItem.
I am trying to check wether a onedrive file has been checked out using microsoft-graph. According to the documentation https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/driveitem , there is a publication property of a DriveItem. But this property is not returned by default. But the documentation does not mention how to retrieve this property.
I recommend you review the Use query parameters to customize responses documentation page. You can use $select to choose which properties are returned in the API response.
I believe your query would look something like:
GET https://graph.microsoft.com/v1.0/me/drive/items/{ITEM ID}?$select=publication
You can try this query in the Graph explorer with our demo account at https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/drive/items/01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K?$select=publication&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
I would like to know if there is a possibility of getting an email with a particular changeKey. I tried to do apply filtering on the changeKey but it did not work.
As clearly mentioned in the response ChangeKey does not support filtering with the current version of Microsoft Graph-Api. You need to find another approach here.