content
| - %META:TOPICPARENT{name="OdsBriefcase"}%
---+ Using ODS-Briefcase to mediate access to data stored on Microsoft OneDrive
%TOC%
---++ Introduction
[[https://onedrive.live.com/about/][Microsoft OneDrive]] (formerly SkyDrive) is a service that allows users to upload and sync files to a cloud storage, and then access them from a Web browser or their local device. It is part of the [[http://www.live.com][Windows Live]] set of online services and allows users to keep the files private, share them only with chosen contacts, or make them public.
OneDrive file storage offers users a number of features:
* Free online storage: allows 7GB of free online cloud storage
* Can be used for back up of photos or documents, or for making them public and/or sharing a folder with friends
* Drag-and-drop upload: uploading files by simply dragging files from one's computer and dropping them into OneDrive
* Create and share office (Word, Excel, and PowerPoint) documents which can then be shared through [[http://hotmail.com][Hotmail]]
ODS-Briefcase offers a new "OneDrive" folder type which provides several additional features, once the ODS system is configured with a registered Windows API key and secret pair:
* Specify credentials for authentication against OneDrive, enabling retrieval of any or all of your folders and files, including any associated metadata
* Specify which Sponger Extractor Cartridges and Sponger Meta Cartridges should be run against your OneDrive data
* Save fetched data, metadata, and Sponger output, into a newly created OneDrive-specific RDF Graph in the Virtuoso RDF Quad Store
* Specify other ODS Users or WebID ACLs who should be granted access to your OneDrive data through ODS-Briefcase
---++ Example
Here is a sample scenario showing the whole process, from setting the Windows Live API key in ODS, to retrieving all OneDrive content to ODS-Briefcase.
---+++ Prerequisites
* A [[http://www.live.com/][Windows Live user account]]
* Files and folders (data) stored in your [[https://onedrive.live.com/][OneDrive Space]]
* Administrative (DBA) access to a [[http://virtuoso.openlinksw.com/][Virtuoso Server]] instance, on which the following have been installed --
* [[https://virtuoso.openlinksw.com/download/][ODS-Framework VAD package]]
* [[https://virtuoso.openlinksw.com/download/][ODS-Briefcase VAD package]]
* [[https://virtuoso.openlinksw.com/download/][Virtuoso RDF Mappers VAD package]]
---+++ Steps
---++++ 1 - Get a Microsoft Graph API key for use with ODS-Briefcase
Note that at present, each Virtuoso + ODS instance can only be configured with a single Microsoft Graph API key, which will then be used by all ODS-Briefcase users when targeting OneDrive from that instance. Microsoft may impose limitations on this key's use. Such limitations are outside the scope of OpenLink or Virtuoso control.
1 Browse to <[[https://portal.azure.com/#home][https://portal.azure.com/#home]]> and enter your Windows Live user credentials:
%BR%%BR%%BR%%BR%
1 Select Azure Active Directory > App Registrations > New Registration and then enter a name for your Live Connect client application (i.e., your ODS-Briefcase instance) to be known by, e.g., "MyODSOneDrive", set the redirect URL, and click the Register button:
%BR%%BR%%BR%%BR%
1 Select Certificates & secrets from Application Settings Columb
%BR%%BR%%BR%%BR%
and then New client secret
%BR%%BR%%BR%%BR%
1 Select Api permissions from Application Settings Columb. Use Add permission option to choose needed permissions.%BR%%BR%
The minimal permissions set is shown below.
%BR%%BR%%BR%%BR%
---++++ 2 - Configure ODS to use your Microsoft Graph API key and secret
1 Browse to your Virtuoso + ODS instance,
http://<cname>[:<port>]/ods , e.g., <[[http://example.com/ods/][http://example.com/ods/]]>, and click Sign In.
%BR%%BR%%BR%%BR%
1 Log in as a Virtuoso+ODS user with Administrator privileges, e.g., dba .
%BR%%BR%%BR%%BR%
1 Click on Site Settings:
%BR%%BR%%BR%%BR%
1 Click on Login Authentication Keys:
%BR%%BR%%BR%%BR%
1 Select OneDrive API in the API Name menu, provide the Client ID and Client secret from the new Live Connect application you created above, and click Add.
%BR%%BR%%BR%%BR%
1 ODS-Briefcase is now configured to use OneDrive.
%BR%%BR%%BR%%BR%
---++++ 3 - Access files stored on OneDrive through ODS-Briefcase
1 Browse to your Virtuoso + ODS instance, http://<cname>[:<port>]/ods , e.g., <[[http://example.com/ods/][http://example.com/ods/]]>.
%BR%%BR%%BR%%BR%
1 Log in as a Virtuoso+ODS user with normal privileges, e.g., demo .
%BR%%BR%%BR%%BR%
1 Click to the ODS-Briefcase application:
%BR%%BR%%BR%%BR%
1 Click New Folder from the main Briefcase control strip:
%BR%%BR%%BR%%BR%
1 In the New Folder form, specify a Folder Name, e.g., MyOneDriveFolder, and set the Folder type to OneDrive:
%BR%%BR%%BR%%BR%
1 Click to the newly visible OneDrive tab:
%BR%%BR%%BR%%BR%
1 All RDF data extracted from and otherwise collected about your Google Drive files will be saved to a named graph, where the default name is constructed from the host ODS instance, the ODS username, and the Briefcase folder name -- http://<host>[:<port>]/DAV/home/<user-name>/<folder-name>#this -- so, in this example, the default graph would be named <[[http://example.com/ods/demo/MyOneDriveFolder#this][http://example.com/ods/demo/MyOneDriveFolder#this]]>. Expert users may wish to change this graph name, but the default is suitable for most users.
%BR%%BR%%BR%%BR%
1 You can also turn on the [[http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSponger][Virtuoso Sponger]], to process your OneDrive files more comprehensively. When the Sponger is enabled for your folder, you can specify which "Sponger Extractor Cartridges" and "Sponger Meta Cartridges" will be run over the files in your Google Drive. You can enable all cartridges, but this will introduce some processing overhead. It's generally best to enable only those cartridges which will be applicable to your files and their content. For instance, you may know that you'll only be storing Microsoft and Open Office documents here, and that you want to find all Named Entities described by DBpedia. Then, click "Authenticate", to connect your new folder to your OneDrive:
%BR%%BR%%BR%%BR%
1 You'll be prompted to enter your Windows Live user's credentials. Note that this Windows Live user need not be the application owner/"developer" who got the API key earlier.
%BR%%BR%%BR%%BR%
1 Windows Live will prompt for confirmation that you intend to let your application ("MyODSOneDrive") have access to your OneDrive content. Click Yes.
%BR%%BR%%BR%%BR%
1 Your Windows Live user's real name will now be displayed. Click Create to finish the folder creation process.
%BR%%BR%%BR%%BR%
1 Your new OneDrive-linked folder should now be displayed in your Briefcase resources list:
%BR%%BR%%BR%%BR%
1 Click the folder name to see the resources ODS-Briefcase has found in your OneDrive Dataspace:
%BR%%BR%%BR%%BR%
---++ Related
* [[http://bit.ly/SK7WAI][How Linked Data & WebID Deliver Controlled Access to Resources in Google Drive, OneDrive, DropBox, Box.Net, and Amazon S3]]
* [[OdsBriefcaseAmazonS3][Using ODS-Briefcase to mediate access to data stored on Amazon S3]]
* [[OdsBriefcaseBoxNet][Using ODS-Briefcase to mediate access to data stored on Box (a/k/a box.com or box.net)]]
* [[OdsBriefcaseDropBox][Using ODS-Briefcase to mediate access to data stored on DropBox]]
* [[OdsBriefcaseGoogleDrive][Using ODS-Briefcase to mediate access to data stored on Google Drive]]
* [[OdsBriefcaseFolders][Manage different Briefcase type folders in Briefcase]]
* [[OdsBriefcase][ODS-Briefcase]]
* [[http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSponger][Virtuoso Sponger]]
* [[http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSources][OpenLink-supplied Virtuoso Sponger Cartridges]]
* [[http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMeta][Supported Meta Cartridges in Virtuoso]]
* [[http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMetaREST][Meta Cartridges Usage via REST Request]]
* [[http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamples][Parametrized Examples of Meta Cartridge Usage via REST Request]]
* |