question

PatrickRote-3473 avatar image
0 Votes"
PatrickRote-3473 asked 35247258 edited

what filtering options are supported MS graph api (List used) - Javascript?

Hi All,
I'm working on a script and i can call the below graph api endpoint

https://graph.microsoft.com/v1.0/me/insights/used

without any issue. But i would like to use filter like so to list the documents that a user has viewed or modified for a specific document library.


var srchStr = "ABC" - Name of site

graphEndPoint: "https://graph.microsoft.com/v1.0/me/insights/used?$filter=ResourceVisualization/containerDisplayName eq '"+ srchStr + "'"

graphEndPoint:"https://graph.microsoft.com/v1.0/me/insights/used?$filter=substringof('"+ srchStr + "', ResourceVisualization/containerDisplayName)"

But i keep getting error

{"error":{"code":"BadRequest","message":"Invalid filter clause","innerError

My goal is to list the documents that a user has viewed or modified for a specific document library.
Is this possible and thanks in advance

microsoft-graph-insights
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ShwetaChoudhary-8869 avatar image
1 Vote"
ShwetaChoudhary-8869 answered

As per documentation on resourceVisualization resource type, filtering on following fields are supported.

type
mediaType
containerType

Currently, filtering on containerDisplayName is not supported which explains bad request error as response.

Being said that, you can file a user voice for your specific ask so that it could be considered for future implementation.

Hope this helps. Thanks!


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.