OneDrive / onedrive-sdk-ios

OneDrive SDK for iOS
https://dev.onedrive.com
Other
100 stars 87 forks source link

Login via portal.office.com #161

Closed tobihagemann closed 7 years ago

tobihagemann commented 7 years ago

Is it possible to use OneDrive via portal.office.com? A user with a student license for Office 365 asked us if it'd be able to access his OneDrive. We're using this SDK and I'm not sure if that's even possible. Is that even OneDrive? Is there another SDK? Is the API maybe the same, just another endpoint?

kevklam commented 7 years ago

It's a pretty vague question but I'll try to answer it as well as I can. 1) Office365 has SharePoint, which is accessible via the Microsoft Graph API/SDK. The Microsoft Graph API is a unified API endpoint for all of Office365 cloud offerings and can also access OneDrive for Consumer. 2) 'OneDrive for Business' is a subset of SharePoint and is accessible via both the MS Graph API/SDK and OneDrive API/SDK. 3) portal.office.com seems to show a list of 'recent' documents from SharePoint, as well as links to Outlook and various other Office365 cloud offerings. The 'recent' list can be accessed via both the Microsoft Graph and OneDrive APIs: https://dev.onedrive.com/drives/recent_files.htm https://dev.onedrive.com/direct-endpoint-differences.htm I believe this will also contain recently used files from all of SharePoint, but I am not 100% sure.

Please reopen this issue if additional follow-up is needed.

tobihagemann commented 7 years ago

Thank you for giving me an overview. Sorry for the vague question. I guess I don't understand the whole Microsoft ecosystem. What's up with Microsoft Graph? Is this new? I just saw that there is also an SDK for iOS: microsoftgraph/msgraph-sdk-ios

Is this going to replace the OneDrive SDK? It seems to me that Microsoft Graph is capable of doing "more".

Back to the scenario, where a user would like to access his files that he has stored as a student via Office 365 (portal.office.com). From your answer I think I understood that this is SharePoint and not(!) OneDrive. Does that mean I'd have to use the Microsoft Graph SDK in order to support SharePoint? Or maybe even switch to the Microsoft Graph SDK completely, because it also supports OneDrive?

kevklam commented 7 years ago

Graph is, in a general sense, a proxy layer to other office365 cloud services including OneDrive, outlook, calendar, etc... This is why the API signature for OneDrive related functionality looks so similar, and why Graph "does more". The main benefit is that it's a single API endpoint, which makes a number of things nicer including using a single auth token to access any o365 service, and not having to worry about per-tenant API endpoint discovery. We are generally encouraging people to use Graph where possible, but due to its nature it's sometimes the case that new OneDrive features may lag sometime before being opened up on Graph. Also, if you're already using the OneDrive API/sdk and it meets your needs, it's probably not worth switching.

As for your student's files - it depends whether their files are in OneDrive for Business or a general share point site. "Portal.office.comhttp://Portal.office.com" is just a dashboard and probably shows files from both. So their files could be stored in one of two places: 1) on a common team site, I.e. HTTPS://somecompany.sharepoint.com/someteamHTTPS://somecompany.sharepoint.com/someteam/path/to/file.docx 2) in their OneDrive for Business, I.e. https://somecompany-my.sharepoint.com or https://somecompany.sharepoint.com/_personal/{their username}

If the file is stored in their OneDrive for Business, then the OneDrive API/sdk will work for you. If the files are stored in a sharepoint team site, you will probably have to use Graph.


From: Tobias Hagemann notifications@github.com<mailto:notifications@github.com> Sent: Sunday, March 12, 2017 1:38 AM Subject: Re: [OneDrive/onedrive-sdk-ios] Login via portal.office.comhttp://portal.office.com (#161) To: OneDrive/onedrive-sdk-ios onedrive-sdk-ios@noreply.github.com<mailto:onedrive-sdk-ios@noreply.github.com> Cc: Kevin Lam klam@outlook.com<mailto:klam@outlook.com>, State change state_change@noreply.github.com<mailto:state_change@noreply.github.com>

Thank you for giving me an overview. Sorry for the vague question. I guess I don't understand the whole Microsoft ecosystem. What's up with Microsoft Graph? Is this new? I just saw that there is also an SDK for iOS:microsoftgraph/msgraph-sdk-ioshttps://github.com/microsoftgraph/msgraph-sdk-ios

Is this going to replace the OneDrive SDK? It seems to me that Microsoft Graph is capable of doing "more".

Back to the scenario, where a user would like to access his files that he has stored as a student via Office 365 (portal.office.comhttp://portal.office.com). From your answer I think I understood that this is SharePoint and not(!) OneDrive. Does that mean I'd have to use the Microsoft Graph SDK in order to support SharePoint? Or maybe even switch to the Microsoft Graph SDK completely, because it also supports OneDrive?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/OneDrive/onedrive-sdk-ios/issues/161#issuecomment-285933250, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQG4qsIdLaBrqrQXDWFq2gcnnDZ5Mhboks5rk70egaJpZM4MWihM.

tobihagemann commented 7 years ago

Thank you for your detailed answer! That helped a lot. :+1: