graph api to get all files from all team channels based on user access

%3CLINGO-SUB%20id%3D%22lingo-sub-1502287%22%20slang%3D%22en-US%22%3Egraph%20api%20to%20get%20all%20files%20from%20all%20team%20channels%20based%20on%20user%20access%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1502287%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20find%20an%20api%20using%20which%20I%20can%20get%20all%20files%20from%20all%20the%20teams%2Fchannels%20where%20particular%20user%20has%20access%20to.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%2Fused%20microsoft%20search%20api%20for%20files.%20but%20that%20return%20all%20files%20based%20on%20delegate%20access%20token%20user%20not%20specific%20to%20a%20particular%20user%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20e.g%3A-%26nbsp%3B%20If%20I%20generate%20delegate%20token%20using%20%22sgupta%22%20but%20now%20I%20have%20to%20use%20the%20api%20to%20find%20all%20the%20files%20accessible%20to%20%22abhishek%22%20.%26nbsp%3B%20I%20can't%20achieve%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20profiled%20the%20microsoft%20teams.%20they%20are%20grabbing%20all%20team%20site%20urls%20to%20get%20the%20files%20but%20that%20is%20not%20efficient%20call%20for%20a%20large%20organization%3CBR%20%2F%3E%3CBR%20%2F%3E%26nbsp%3B%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fteams.microsoft.com%2Fapi%2Fmt%2Fapac%2Fbeta%2Fteams%2Frecent%2Ffiles%2Faggregatefiles%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fteams.microsoft.com%2Fapi%2Fmt%2Fapac%2Fbeta%2Fteams%2Frecent%2Ffiles%2Faggregatefiles%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I am trying to find an api using which I can get all files from all the teams/channels where particular user has access to.

 

I tried/used microsoft search api for files. but that return all files based on delegate access token user not specific to a particular user

 

For e.g:-  If I generate delegate token using "sgupta" but now I have to use the api to find all the files accessible to "abhishek" .  I can't achieve it.

 

I profiled the microsoft teams. they are grabbing all team site urls to get the files but that is not efficient call for a large organization

 https://teams.microsoft.com/api/mt/apac/beta/teams/recent/files/aggregatefiles

1 Reply
Highlighted

@sgsmittal I solved it using microsoft search api using silent login to generate token specific to current user

 

https://docs.microsoft.com/en-us/graph/search-concept-files