Note: This version has been replaced by file picker v7.2. New integrations should use the latest version of the file picker SDK.
The OneDrive file picker SDK enables your web app to quickly integrate OneDrive for opening and saving files without a lot of code. The latest version of the file picker SDK works with any OneDrive account, Personal or Business.
You can use the file picker SDK to integrate with OneDrive in the following ways:
- Open a file and receive a short-lived URL to download the content of the file.
- Create a long-lived sharable link to view or edit a file. These are designed to be sent or shared with co-workers, friends and family, or other individuals.
- Get a direct link to the file which requires end user authorization.
- Get a file or folder ID for a file that can be used with the OneDrive API to perform API actions on the file.
- Save a file to OneDrive.
Note: You can only get shareable links for files in OneDrive for Business if the user's tenant admin has enabled external sharing. For OneDrive consumer, you can get shareable links for all files.
To get started you need to register your application and receive an app ID from the Microsoft Application Registration Portal.
- Log in to the Microsoft Application Registration Portal using your Microsoft account, or a work or school account.
- Click Add an app and enter a name for your app.
- Click Generate New Password to create an Application secret. While this value is not necessary for the picker, it must have been created.
- Click Add Platform and then select Web.
- Enter one or more URLs where the picker will be hosted on your website. Each page that hosts the picker needs to have a redirect URL provided.
- Click the Save button to save your changes.
The OneDrive picker and saver supports the following web browsers:
- Internet Explorer Desktop & Mobile 11+
- Microsoft Edge v25+
- Chrome Desktop 5+
- Chrome for Android
- Android Browser 4.1+
- Firefox Desktop & Mobile 8+
- Safari Desktop & Mobile 5+
- The SDK does not support saving files through a form upload on IE9.
- The SDK returns thumbnail links that require authentication for image files selected from a user's OneDrive for Business.
- Files selected from OneDrive for Business may not have a thumbnail collection available. You should check for a null value.
- The SDK will fail to upload a file to OneDrive for Business if the filename is taken.
- Data URIs uploaded to OneDrive for Business through the SDK appear to succeed but show up as 0 byte files.