In order to get the credentials, register the app with the right permissions on OneDrive with an appropriate user or owner. Gather the following information by performing the steps described in Registering the OneDrive for Business Application.
-
Service Host
-
Application ID
Click the application display name to obtain the Application ID.
-
Tenant ID
Tenant ID is referred to as Directory ID in Registering the OneDrive for Business Application.
-
Authentication URL
Default: https://login.microsoftonline.com
-
Shared Secret
This is the key value recorded while saving the description and an expiration date in Registering the OneDrive for Business Application.
-
Drive
Provide a specific user account name as the drive to use.
The username must be provided in the following format: username@#tenant#.onmicrosoft.com
For example: myusername@mycompanytenantmytenantname.onmicrosoft.com
Tip
Drive Detection lists the drives from the tenant root site.
Additional Information
-
For more information about registering an app, see https://docs.microsoft.com/en-us/graph/auth-v2-service.
-
Note that pruning can only move aged data files to the recycle bin as Microsoft intentionally requires administrators to empty the recycle bin manually.