dataiku / dss-plugin-sharepoint-online

Dataiku DSS plugin to interact with your lists and documents stored on Microsoft SharePoint Online
https://www.dataiku.com/product/plugins/sharepoint-online/
Apache License 2.0
3 stars 4 forks source link

Allow custom base url #39

Open HuyNguyen7994 opened 2 years ago

HuyNguyen7994 commented 2 years ago

My organization is using teamsite.<tenant>.com instead of normal <tenant>.sharepoint.com. Hence, when I tried to connect it returned following error:

Test failed: Failed to initialize kernel : <class 'robust_session.RobustSessionError'> : Error on attempt #5: HTTPSConnectionPool(host='teamsite.<tenant>.sharepoint.com', port=443): Max retries exceeded with url: /sites/<mysite>/_api/contextinfo (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f219f728320>: Failed to establish a new connection: [Errno -2] Name or service not known',))

I suggest to not automatically append .sharepoint.com at the end of the tenant https://github.com/dataiku/dss-plugin-sharepoint-online/blob/f7a9ef9f8584a77a9586dc12ec2f7b11870b999b/python-lib/sharepoint_client.py#L136