Retrieve all available drives for OneDrive

%3CLINGO-SUB%20id%3D%22lingo-sub-2281375%22%20slang%3D%22en-US%22%3ERetrieve%20all%20available%20drives%20for%20OneDrive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2281375%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20building%20the%20iOS%20app%20that%20allows%20users%20to%20upload%20their%20data%20to%20OneDrive.%20Currently%20it%20has%20access%20to%20default%20drive%20by%20%3CEM%3E%2Fme%2Fdrive%20endpoint.%3C%2FEM%3E%20But%20some%20of%20the%20user's%20demand%20ability%20to%20upload%20their%20files%20to%20the%20shared%20drives%20in%20their%20company%20account.%20I%20first%20tried%20%3CEM%3E%2Fme%2Fdrives%3C%2FEM%3E%2C%20but%20it%20returns%20only%20default%20one%2C%20which%20is%20from%20the%20first%20endpoint%2C%20though%20the%20account%20I%20use%20for%20testing%20has%20items%20shared%20with%20it%2C%20and%20they%20are%20displayed%20in%20the%20browser%20version%20of%20OneDrive.%20I%20also%20tried%20%3CEM%3E%2Fsites%2Froot%2Flist%3C%2FEM%3E%2C%20but%20it%20returned%20objects%2C%20that%2C%20as%20I%20understood%2C%20not%20what%20I%20need.%3C%2FP%3E%3CP%3EFor%20all%20requests%20I%20use%20iOS%20OneDrive%20SDK%20from%20GitHub%20and%20MSAL%20pod%20for%20authentication%2C%20also%20double%20check%20in%20the%20Graph%20Explorer%2C%20but%20the%20responses%20are%20the%20same.%3C%2FP%3E%3CP%3EThe%20permissions%2Fscopes%20are%3A%20%22%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2FFiles.ReadWrite.All%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2FFiles.ReadWrite.All%3C%2FA%3E%22%2C%20%22%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2FUser.Read%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2FUser.Read%3C%2FA%3E%22%2C%20%22%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2FDirectory.ReadWrite.All%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2FDirectory.ReadWrite.All%3C%2FA%3E%22.%3C%2FP%3E%3CP%3ECan%20anyone%20please%20advice%2C%20what%20endpoint%20should%20I%20use%20for%20retrieving%20list%20of%20company%20shared%20drives%20and%20possible%20what%20permissions%2Fscopes%20should%20I%20use%20or%20modify%20existing%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2281375%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAPIs%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Emobile%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOneDrive%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I'm building the iOS app that allows users to upload their data to OneDrive. Currently it has access to default drive by /me/drive endpoint. But some of the user's demand ability to upload their files to the shared drives in their company account. I first tried /me/drives, but it returns only default one, which is from the first endpoint, though the account I use for testing has items shared with it, and they are displayed in the browser version of OneDrive. I also tried /sites/root/list, but it returned objects, that, as I understood, not what I need.

For all requests I use iOS OneDrive SDK from GitHub and MSAL pod for authentication, also double check in the Graph Explorer, but the responses are the same.

The permissions/scopes are: "https://graph.microsoft.com/Files.ReadWrite.All", "https://graph.microsoft.com/User.Read", "https://graph.microsoft.com/Directory.ReadWrite.All".

Can anyone please advice, what endpoint should I use for retrieving list of company shared drives and possible what permissions/scopes should I use or modify existing?

0 Replies