c# - Microsoft Graph: How to receive list of remote items for drive? -


how can receive list of drive items remote items (items links items on other drives, shared me items) ?

of course can it:

// universal version var res = new list<driveitem>(); var list = await client.me.drive.root.children.request().getasync(); while (list != null) {     res.addrange(list.currentpage.where(i => (i.remoteitem != null)));     list = (list.nextpagerequest != null) ? (await list.nextpagerequest.getasync()) : null; } return res; 

but slow, , requires parse items. can use filter resolve task? in other words, code below work on types of drives (onedrive personal, business, sharepoint ...)?

// filtered version var res = new list<driveitem>(); var list = await client.me.drive.root.children.request().filter("remoteitem ne null").getasync(); while (list != null) {     res.addrange(list.currentpage);     list = (list.nextpagerequest != null) ? (await list.nextpagerequest.getasync()) : null; } return res; 

according onedrive documentation:

while filter syntax can used on any property of item, have optimized properties fast , efficient filter on.

note: in onedrive business, sharepoint online , sharepoint server 2016, filtering support name , url properties.

does mean onedrive business , sharepoint aren't support filtering remoteitem facet?

unfortunately microsoft grap documentation doesn't contain additional information it.

p.s.: don't have onedrive business account, so, sorry can't check assumption.

first things first, should join office 365 developer program. program includes free office 365 developer license resolve onedrive business issue. there several subtle differences between 2 systems testing against both highly advised.

as question, take @ sharedwithme endpoint. method returns collection of items have been shared remote drives.

i highly recommend pivoting microsoft graph. provides same apis onedrive exposes vast array of additional endpoints well. huge amount of effort being funneled graph, making far better long-term strategy.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -