diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c1b098..138aa0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [Version 1.1.7](https://github.com/dataiku/dss-plugin-sharepoint-online/releases/tag/v1.1.7) - Bugfix release - 2025-07-07 + +- Custom user agent + ## [Version 1.1.6](https://github.com/dataiku/dss-plugin-sharepoint-online/releases/tag/v1.1.6) - Bugfix release - 2025-04-01 - Fix issue with 255+ chars file paths. The new limit is 400 chars, imposed by SharePoint's API. diff --git a/plugin.json b/plugin.json index 9f1bbbc..3aca14d 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "id": "sharepoint-online", - "version": "1.1.6", + "version": "1.1.7", "meta": { "label": "SharePoint Online", "description": "Read and write data from/to your SharePoint Online account", diff --git a/python-lib/dss_constants.py b/python-lib/dss_constants.py index 6e4f7d3..3501866 100644 --- a/python-lib/dss_constants.py +++ b/python-lib/dss_constants.py @@ -37,7 +37,7 @@ class DSSConstants(object): "sharepoint_oauth": "The access token is missing" } PATH = 'path' - PLUGIN_VERSION = "1.1.6" + PLUGIN_VERSION = "1.1.7-beta.2" SECRET_PARAMETERS_KEYS = ["Authorization", "sharepoint_username", "sharepoint_password", "client_secret", "client_certificate", "passphrase"] SITE_APP_DETAILS = { "sharepoint_tenant": "The tenant name is missing", @@ -60,3 +60,4 @@ class DSSConstants(object): "tinyint": "Integer", "date": "DateTime" } + USER_AGENT = "Dataiku SharePoint Plugin" diff --git a/python-lib/sharepoint_client.py b/python-lib/sharepoint_client.py index 923258e..46ef7e2 100644 --- a/python-lib/sharepoint_client.py +++ b/python-lib/sharepoint_client.py @@ -1031,6 +1031,7 @@ def get(self, url, headers=None, params=None): retries_limit = ItemsLimit(SharePointConstants.MAX_RETRIES) headers = headers or {} headers["Accept"] = DSSConstants.APPLICATION_JSON + headers["User-Agent"] = DSSConstants.USER_AGENT headers["Authorization"] = self.get_authorization_bearer() response = None while not is_request_performed(response) and not retries_limit.is_reached(): @@ -1043,6 +1044,7 @@ def post(self, url, headers=None, json=None, data=None, params=None): default_headers = { "Accept": DSSConstants.APPLICATION_JSON_NOMETADATA, "Content-Type": DSSConstants.APPLICATION_JSON_NOMETADATA, + "User-Agent": DSSConstants.USER_AGENT, "Authorization": self.get_authorization_bearer() } if self.form_digest_value: