Access token flow
- Last Updated: July 3, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- Microsoft Sharepoint 6.0
- Documentation
The access token flow passes the access token directly from the client to the SharePoint service for authentication.
Note: As opposed to using a
third-party application such as Postman, you can use the Progress DataDirect SharePoint
Configuration Manager to obtain an access token to support the access token flow. See Obtain access and refresh tokens using the
Configuration Manager for details.
Note: Access tokens are temporary and must be replaced to maintain the session without
interruption. The life of an access token is typically one hour.
To configure the driver to use an access token flow:
- Set the ServiceURL property to the URL of the SharePoint site (or "site collection") to which you are connecting. For example, https://mycorp.sharepoint.com/sites/marketing/global.
- Set the AccessToken property to the value of the access token obtained from external sources.
The following examples show the connection information required to establish a session using the access token flow.
Connection URL
Connection conn = DriverManager.getConnection
("jdbc:datadirect:sharepoint:
ServiceURL=https://mycorp.sharepoint.com/sites/marketing/global;
AccessToken=C3TQH9zjwek4CgJCU-4Mxb2DxLNfI2LB3a-dNfpWYx;");
Data Source
SharePointDataSource mds = new SharePointDataSource();
mds.setDescription("My SharePoint Data Source");
mds.setServiceURL("https://mycorp.sharepoint.com/sites/dev");
mds.setAccessToken("C3TQH9zjweek4CgJCU-4Mxb2DxPLNfI2LB3a-dNfpWnYx");