Microsoft OneDrive
Microsoft OneDrive (formerly
SkyDrive) is a file hosting service operated by Microsoft.
This notebook covers how to load documents from OneDrive. Currently, only docx, doc, and pdf files are supported.
Prerequisitesโ
- Register an application with the Microsoft identity platform instructions.
- When registration finishes, the Azure portal displays the app registration's Overview pane. You see the Application (client) ID. Also called the
client ID, this value uniquely identifies your application in the Microsoft identity platform. - During the steps you will be following at item 1, you can set the redirect URI as
http://localhost:8000/callback - During the steps you will be following at item 1, generate a new password (
client_secret) underย Application Secretsย section. - Follow the instructions at this document to add the following
SCOPES(offline_accessandFiles.Read.All) to your application. - Visit the Graph Explorer Playground to obtain your
OneDrive ID. The first step is to ensure you are logged in with the account associated your OneDrive account. Then you need to make a request tohttps://graph.microsoft.com/v1.0/me/driveand the response will return a payload with a fieldidthat holds the ID of your OneDrive account. - You need to install the o365 package using the command
pip install o365. - At the end of the steps you must have the following values:
CLIENT_IDCLIENT_SECRETDRIVE_ID