mimetype and file ID in one call

%3CLINGO-SUB%20id%3D%22lingo-sub-2864874%22%20slang%3D%22en-US%22%3Emimetype%20and%20file%20ID%20in%20one%20call%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2864874%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20are%20wanting%20to%20integrate%20our%20product%20with%20OneDrive.%20Using%20the%20Graph%20API%2C%20we%20need%20to%20be%20able%20to%20ping%20a%20OneDrive%20folder%20and%20grab%20any%20documents%20added%20to%20the%20folder%20since%20the%20last%20time%20we%20checked.%20We%20would%20then%20pull%20those%20documents%20over%20to%20our%20system.%20Our%20system%20only%20accepts%20certain%20document%20types%2C%20however.%20So%20we%20need%20to%20get%20the%20mimetype%20information%20AND%20the%20document%20ID%20returned%20to%20us.%20We%20cannot%20find%20anything%20within%20the%20Graph%20API%20that%20lets%20us%20get%20this%20information%20in%20one%20request.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20looks%20like%20we%20have%20to%20do%20two%20requests%2C%20which%20will%20just%20get%20messy.%20Does%20anyone%20have%20a%20good%20solution%20for%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGoogle%20APIs%20allow%20you%20to%20easily%20pull%20this%20information%20back.%20We%20have%20a%20similar%20integration%20with%20Google%20Drive%20and%20it%20works%20without%20a%20hitch.%20But%20we%20are%20stuck%20trying%20to%20create%20a%20similar%20integration%20with%20OneDrive.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F69547153%2Fhow-do-i-get-the-mimetype-and-file-id-using-the-microsoft-graph-api-for-onedrive%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Eposted%20the%20question%20on%20Stack%20Overflow%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eif%20you%20want%20to%20read%20a%20response%20someone%20gave%20me%20over%20there.%26nbsp%3B%20We%20prefer%20not%20to%20use%20the%20file%20type%20information%20as%20there%20are%20edge%20cases%20where%20that%20could%20create%20issues.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2864874%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

We are wanting to integrate our product with OneDrive. Using the Graph API, we need to be able to ping a OneDrive folder and grab any documents added to the folder since the last time we checked. We would then pull those documents over to our system. Our system only accepts certain document types, however. So we need to get the mimetype information AND the document ID returned to us. We cannot find anything within the Graph API that lets us get this information in one request.

 

It looks like we have to do two requests, which will just get messy. Does anyone have a good solution for this?

 

Google APIs allow you to easily pull this information back. We have a similar integration with Google Drive and it works without a hitch. But we are stuck trying to create a similar integration with OneDrive.

 

I posted the question on Stack Overflow if you want to read a response someone gave me over there.  We prefer not to use the file type information as there are edge cases where that could create issues. 

0 Replies