So I am a little confused as I have been trying to accomplish this without success for months. Can node-sp-auth actually authenticate with the current users credentials WITHOUT being give the users credentials? The only time I can get node-sp-auth to work is either saving the credentials to the disk or typing them in directly. A working example of the behavior I am trying to achieve is accomplished (in SQL) with the "msnodesqlv8" module (it specifically appears to use Windows ODBC but I could be mistake, which is obviously not an option for SharePoint, I am just using this as an example of the behavior I am trying to get).
Has anyone been able to have node-sp-auth using the current user authentication without storing the credentials? Thanks!
node-sp-auth
in browser, such kind of scenarios are not supportedHi. Could you please help me make sp-rest-proxy correctly work with batching? It drives me crazy...
Let the example be https://pnp.github.io/pnpjs/sp/docs/items/#update-multiple-items. Proxy gets POST request with payload:
--batch_b18ca450-d9dc-40c7-8855-b7de9a621369
Content-Type: multipart/mixed; boundary="changeset_91eacb9d-a188-47d2-8b97-99f97271f926"
--changeset_91eacb9d-a188-47d2-8b97-99f97271f926
Content-Type: application/http
Content-Transfer-Encoding: binary
MERGE http://localhost:3000/sites/internalsites/Recruiting/_api/web/lists/getByTitle('rapidupdate')/items(1) HTTP/1.1
accept: application/json; odata=verbose
content-type: application/json;odata=verbose;charset=utf-8
if-match: *
x-clientservice-clienttag: PnPCoreJS:@pnp-1.2.8
{"__metadata":{"type":"SP.Data.CustomListListItem"},"Title":"Batch 6"}
--changeset_91eacb9d-a188-47d2-8b97-99f97271f926
Content-Type: application/http
Content-Transfer-Encoding: binary
MERGE http://localhost:3000/sites/internalsites/Recruiting/_api/web/lists/getByTitle('rapidupdate')/items(2) HTTP/1.1
accept: application/json; odata=verbose
content-type: application/json;odata=verbose;charset=utf-8
if-match: *
x-clientservice-clienttag: PnPCoreJS:@pnp-1.2.8
{"__metadata":{"type":"SP.Data.CustomListListItem"},"Title":"Batch 7"}
--changeset_91eacb9d-a188-47d2-8b97-99f97271f926--
--batch_b18ca450-d9dc-40c7-8855-b7de9a621369--
but result is
--batchresponse_c92f0856-7428-4f77-ba5e-a9c84f24bf68
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 400 Bad Request
CONTENT-TYPE: application/json;odata=verbose;charset=utf-8
{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"Invalid request."}}}
--batchresponse_c92f0856-7428-4f77-ba5e-a9c84f24bf68
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 400 Bad Request
CONTENT-TYPE: application/json;odata=verbose;charset=utf-8
{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"Invalid request."}}}
--batchresponse_c92f0856-7428-4f77-ba5e-a9c84f24bf68--
If I deploy this code to dev SharePoint 2016 page it does updates without errors.
sp-rest-proxy changes site name correctly: POST (batch): http://bss-ihome2016/sites/internalsites/Recruiting/_api/$batch
I've red lots of articles, also this koltyakov/sp-rest-proxy#42 , but in my case it looks OK, but does not OK.
rejectUnauthorized
which bypasses certifcate errorsrejectUnauthorized
flag usually solves all problems related to self-signed, expired or other kind of invalid certificates