This section describes how to obtain OAuth tokens, which the connector needs to retrieve content from OneDrive.
NOTE: There is no need to complete this procedure if you ran the OAuth configuration tool when the connector was installed.
To obtain OAuth tokens
oauth_tool.cfg
in a text editor.In the [Default]
section, specify any SSL or proxy settings necessary to connect to OneDrive:
SSLMethod
|
The version of SSL/TLS to use. |
ProxyHost
|
The host name or IP address of the proxy server that the connector must use. |
ProxyPort
|
The port of the proxy server that the connector must use. |
For example:
SSLMethod=NEGOTIATE ProxyHost=10.0.0.1 ProxyPort=8080
Make the following configuration changes:
OneDrive (single user)
[OAuthTool]
section, uncomment the AuthorizeUrl
parameter that matches your use case. The permissions requested by the connector when you run the OAuth tool must match or be a subset of those you granted when you created the OneDrive application (see Create an Application to Represent the Connector).In the [OAuthTool]
section, set the following parameters:
AppKey
|
The application key you obtained when you created the application to represent the connector. |
AppSecret
|
The application secret you obtained when you created the application to represent the connector. |
OneDrive for Business (multiple users)
In the [OAuthTool-Business]
section, set the following parameters:
AdminConsentUrl
|
Replace the {tenant} placeholder with your tenant name, for example my-domain.onmicrosoft.com . |
TokenUrl
|
Replace the {tenant} placeholder with your tenant name, for example my-domain.onmicrosoft.com . |
AppKey
|
The application key you obtained when you created the application to represent the connector. |
AppSecret
|
The application secret you obtained when you created the application to represent the connector. |
Open a command-line window and run the relevant command:
OneDrive (single user):
oauth_tool.exe oauth_tool.cfg OAuthTool
OneDrive for Business (multiple users):
oauth_tool.exe oauth_tool.cfg OAuthTool-Business
Your default web browser opens to the OneDrive web site. The web page asks you to authorize the connector to access OneDrive.
Authorize the application. You must use the username and password of an account that has permission to view everything that you want to ingest (such as an administrator account).
OneDrive provides the OAuth tokens, and the OAuth configuration tool creates a file named oauth.cfg
. This contains the parameters that the connector requires to authenticate with OneDrive. These parameters are automatically included in the connector configuration file, because the connector configuration file includes the following line to import the parameters into the [MyTask]
section:
[MyTask] < "oauth.cfg" [OAUTH]
For more information about including parameters from another file, see Include an External Configuration File. The OAuth tool also prints the parameters it has set to the command-line window so that you can set these directly in the connector's configuration file if you prefer.