The refresh token grant is used to replace expired access tokens with active ones by exchanging the refresh token at the endpoint specified by the TokenURI option.

Note: As opposed to using a third-party application such as Postman, you can use the Progress DataDirect Microsoft SharePoint Configuration Manager to obtain a refresh token to support the refresh token grant. See Obtain access and refresh tokens using the Configuration Manager for details.

To configure the driver to use the refresh token grant:

  • 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 ClientID property to specify the client ID key for your application.
  • Set the ClientSecret property to specify the client secret for your application.
    Important: The client secret is a confidential value used to authenticate the application to the server. To prevent unauthorized access, this value must be securely maintained.
  • Set the TokenURI property to specify the endpoint from which the driver fetches access tokens.
  • Set the RefreshToken property to specify the refresh token used to request a new access token or renew an expired one.
    Important: The refresh token is a confidential value used to authenticate to the server. To prevent unauthorized access, this value must be securely maintained.

The following examples show the connection information required to establish a session using the refresh token grant.

Connection URL
DRIVER=DataDirect 8.0 Microsoft SharePoint;
ServiceURL=https://mycorp.sharepoint.com/sites/marketing/global;
ClientID=29453d6f-6gh-gd8g-44tk831;ClientSecret=12a3=bCD/Ef4Ik+Lm5P6s=/V+Wy1Zcd;
TokenURI=https://login.microsoftonline.com/common/oauth2/v2.0/token;
RefreshToken=12a3=bCD/EfGh4Ijk+Lgd8g-44tk3c527831;
odbc.ini file
[Microsoft SharePoint]
Driver=ODBCHOME/lib/ivsharepoint28.so
...
Description=DataDirect 8.0 Microsoft SharePoint
...
ClientID=29453d6f-6789-25gh-gd8g-44tk3c527831
...
ClientSecret=12a3=bCD/EfGh4Ijk+Lm5P67qR8s=//TuV+WXy1Zabcd
...
TokenURI=https://login.microsoftonline.com/common/oauth2/v2.0/token
...
RefreshToken=12a3=bCD/EfGh4Ijk+Lgd8g-44tk3c527831
...
ServiceURL=https://mycorp.sharepoint.com/sites/marketing/global/
...