Obtain access and refresh tokens using the Configuration Manager
- Last Updated: April 18, 2021
- 2 minute read
- DataDirect Connectors
- JDBC
- Microsoft Sharepoint 6.0
- Documentation
You need the following information before you begin.
- Service URL - the URL of the SharePoint site (or "site collection") to which you are connecting
- Authorization URI - the endpoint for obtaining an authorization code from the Azure authorization service
- Token URI - the endpoint used to exchange authentication credentials for access tokens
- Client ID - the client ID for your application
- Client Secret - the client secret for your application
- Scope - an OAuth scope or a space-separated list of OAuth scopes (only for Microsoft Identity Platform v2)
The following steps describe how you can use the Progress DataDirect SharePoint Configuration Manager to obtain access and refresh tokens for either the access token flow or the refresh token grant. In addition, the Configuration Manager produces a connection URL that you can use in your application.
Results:
The Access Token and Refresh Token fields include access and refresh tokens that you can use to implement OAuth 2.0.
The connection string in the Connection String field may be copied and used in your JDBC application to connect with your SharePoint service.
Note:
Not all the values in the resulting connection string are required. However, the connection string can be copied directly into your JDBC application. The driver ignores any values that do not apply to your OAuth implementation.
For example, the refresh token grant connection string, derived from the Configuration Manager, might include the following properties.
jdbc:datadirect:sharepoint:ServiceURL=serviceurl;
AuthURI=auth_uri;TokenURI=token_uri;
ClientID=client_id;ClientSecret=client_secret;
AccessToken=access_token;RefreshToken=refresh_token;
Scope=scope;
However, only the following properties are required for a refresh token grant connection string.
jdbc:datadirect:sharepoint:ServiceURL=serviceurl;
TokenURI=token_uri;ClientID=client_id;
ClientSecret=client_secret;RefreshToken=refresh_token;