Using an App Folder to store user content without access to all files
The App Folder is a dedicated, special folder for your app.
The App Folder is typically named after your app, and is found in the Apps folder in the user's OneDrive.
If you request the
Files.ReadWrite.AppFolder permission scope and the user authorizes it, your app gets read and write access to this folder.
Since it behaves like any other folder in the user's OneDrive, users can add, modify, and remove content from it. Your app doesn't need to maintain logic unique to the user, which allows the user to rename or move it.
Getting authorization from the user
To have your own app's folder, you must request either the
onedrive.readwrite permission scope when getting an access token.
For more details, see authentication.
Creating your app's folder
OneDrive creates your app's folder in the user's
Apps folder, located in the root of the user's OneDrive, when your app makes the first call to the folder using the special folder namespace.
Below are the most common calls your app can make to create the folder for the first time.
- Get your app folder's metadata:
- List your app folder's children:
- Create a folder under the approot:
- Create an upload session:
- Upload an item's content:
- Upload an item's content w/ metadata:
- Upload an item's content from URL:
Naming your app's folder
When OneDrive creates your app's folder, it uses the Application name set at that point for the calling app id. You may change your app's folder name in the Microsoft Application Registration Portal. If you choose to do so, you may localize your app's folder name by going to the Microsoft Application Registration Portal and editing your app's localization settings.
Working with your app's folder
Your app's folder supports all the standard
|Common task||HTTP method (by path)|
|Get metadata for an Item||
|List an Item's children||
|Create an Item||
|Upload an Item's contents||
|Update an Item's contents||
|Delete an Item||
|Move an Item||
|Copy an Item||
|Download an Item's contents||
|Download specific file format||
|Search for an Item||
|View changes on an Item||
|Get thumbnails for an Item||