The SharePoint worker handles the transfer of files and metadata between SharePoint and the File Store worker.
Worker Configuration Properties
As well as the standard properties set in the API Server configuration file, the SharePoint worker requires authentication details to be set.
Name | Type | Description |
---|---|---|
sharepointAuthDetails | Array <objects> | One or more |
Authentication
To authenticate with a SharePoint server you must set at least one provider in the
When you make a request to the worker you can specify the
For example, given the three configured providers in the configuration example below, if you were to add the following parameters to your request, it would use the username, password, baseUrl, and domain from the first option in the worker configuration options (NTLMTest - NTLM).
"authDetails": {
"identifier": "NTLMTest",
"authType": "NTLM"
}
If you didn't supply any
The three supported types have the following properties:
SAML
Name | Type | Description |
---|---|---|
identifier | String, required | The identifier of the authDetails. This along with the authType makes up the unique identifier for these authDetails |
authType | String, required | "SAML" for this authType |
username | String, required | The username used to authenticate with SharePoint |
password | String, required | The password used to authenticate with SharePoint |
baseUrl | String, required | The base url of the SharePoint server. You should also include the specific site, eg https://example.sharepoint.com/sites/test/Goss/ |
default | Boolean, optional | If true then requests to the worker that do not contain authDetails will use these details |
NTLM
Name | Type | Description |
---|---|---|
identifier | String, required | The identifier of the authDetails. This along with the authType makes up the unique identifier for these authDetails |
authType | String, required | "NTLM" for this authType |
username | String, required | The username used to authenticate with SharePoint |
password | String, required | The username used to authenticate with SharePoint |
baseUrl | String, required | The base url of the SharePoint server. You should also include the specific site. e.g. https://example.sharepoint.com/sites/test/Goss/ |
default | Boolean, optional | If true then requests to the worker that do not contain authDetails will use these details |
domain | String, optional | The domain of the account used to authenticate with SharePoint. Either domain or workstation must be set |
workstation | String, optional | The workstation of the account used to authenticate with SharePoint. Either domain or workstation must be set |
APPONLY
Name | Type | Description |
---|---|---|
identifier | String, required | The identifier of the authDetails. This along with the authType makes up the unique identifier for these authDetails |
authType | String, required | "APPONLY" for this authType |
clientId | String, required | The client Id used to authenticate with SharePoint. More information about where to generate the client Id can be found at https://github.com/s-KaiNet/node-sp-auth/wiki/SharePoint-Online-addin-only-authentication |
clientSecret | String, required | The client secret used to authenticate with SharePoint. More information about where to generate the client secret can be found at https://github.com/s-KaiNet/node-sp-auth/wiki/SharePoint-Online-addin-only-authentication |
baseUrl | String, required | The base url of the SharePoint server. You should also include the specific site. e.g. https://example.sharepoint.com/sites/test/Goss/ |
default | Boolean, optional | If true then requests to the worker that do not contain authDetails will use these details |
Example Configuration
{
"name": "sharepoint",
"instances": 1,
"sharepointAuthDetails": [{
"identifier": "NTLMTest",
"authType": "NTLM",
"username": "myusername",
"password": "mypassword",
"domain": "goss",
"baseUrl": "https://example.sharepoint.com/sites/tst/test/"
},
{
"identifier": "SAMLTest",
"authType": "SAML",
"username": "myusername",
"password": "mypassword",
"baseUrl": "https://example.sharepoint.com/sites/tst/test/"
},
{
"identifier": "AppOnlyTest",
"authType": "APPONLY",
"clientId": "THECLIENTID",
"clientSecret": "THECLIENTSECRET",
"baseUrl": "https://example.sharepoint.com/sites/tst/test/",
"default": true
}
]
}