To authenticate a OneDrive element instance you must register an app with Microsoft. Then when you authenticate, use the Application Id, Password/PublicKey, and Redirect URL from your registered app as the API Key, API Secret, and Callback URL. If you plan to monitor events, also configure the Webhook URL.
If you've already set up an app and just need to know how to find your Application Id and Password/PublicKey, see Locate Credentials for Authentication. If you need to register an app, see Create an Application.
See the latest setup instructions in the Microsoft documentation.
If you already created an application, follow the steps below to locate the Application Id, Password/PublicKey, and Redirect URL. If you have not created an app, see Create an Application.
To find your OAuth 2.0 credentials:
If you have not created an application, you need one to authenticate with Microsoft.
To create an application:
Under Application Secrets, click Generate New Password, record the Password/PublicKey, and then click OK.
Under Platforms, click Add Platform, and then select Web.
In Redirect URLs enter the URL to redirect the user to at the end of the OAuth 2.0 authentication process. For example, the Cloud Elements 2.0 callback URL is https://auth.cloudelements.io/oauth
.
Under Microsoft Graph Permissions add the permissions needed to use your app. See Permissions for details.
Save your app.
When creating your app be aware of the permissions that you set. You will pass the scopes that you select when you request an OAuth 2.0 URL from during the authentication process. See Authorization and sign-in for OneDrive in Microsoft Graph for more information.
Each OneDrive resource requires specific permissions. Review the OneDrive Permissions docs for the permissions to set for your app. Recommended permissions include:
Permission Type | Permissions |
---|---|
Delegated (work or school account) | Files.ReadWrite, Files.ReadWrite.All, Sites.ReadWrite.All offline_access |
Delegated (personal Microsoft account) | Files.ReadWrite, Files.ReadWrite.All offline_access |
Application | Files.ReadWrite.All, Sites.ReadWrite.All offline_access |