I am trying to get a successful result from a POST call. With curl, it succeeds. Also GET calls to the same resource succeed.
in.json contains
{
"LocationCode":"NHSC",
"Deliver_to_Code":"WARD_01",
"ItemNo":"015973",
"CountQuantity":"6"
}
using curl:
C:\Users\joe\OneDrive\Desktop>curl -vvvvvvv --negotiate -u Qwantify:Q!xasQw4N!4#2 -H "Content-Type: application/json" [email protected] http://qds-navmhwk03.qixas.internal:7058/AD_BC140CU01/OData/Company('NHS')/Qwantify_Import_Lines?$format=json
successfully results in:
- Trying 172.30.20.65...
- TCP_NODELAY set
- Connected to qds-navmhwk03.qixas.internal (172.30.20.65) port 7058 (#0)
POST /AD_BC140CU01/OData/Company('NHS')/Qwantify_Import_Lines?$format=json HTTP/1.1
Host: qds-navmhwk03.qixas.internal:7058
User-Agent: curl/7.55.1
Accept: /
Content-Type: application/json
Content-Length: 89
- upload completely sent off: 89 out of 89 bytes
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
< WWW-Authenticate: Negotiate
< Date: Thu, 26 Nov 2020 22:54:55 GMT
<
- Connection #0 to host qds-navmhwk03.qixas.internal left intact
- Issue another request to this URL: 'http://qds-navmhwk03.qixas.internal:7058/AD_BC140CU01/OData/Company('NHS')/Qwantify_Import_Lines?$format=json'
- Found bundle for host qds-navmhwk03.qixas.internal: 0x251c10c0e20 [can pipeline]
- Re-using existing connection! (#0) with host qds-navmhwk03.qixas.internal
- Connected to qds-navmhwk03.qixas.internal (172.30.20.65) port 7058 (#0)
- Server auth using Negotiate with user 'Qwantify'
POST /AD_BC140CU01/OData/Company('NHS')/Qwantify_Import_Lines?$format=json HTTP/1.1
Host: qds-navmhwk03.qixas.internal:7058
Authorization: Negotiate TlRMTVNTUAABAAAAt4II4gAAAAAAAAAAAAAAAAAAAAAKAGFKAAAADw==
User-Agent: curl/7.55.1
Accept: /
Content-Type: application/json
Content-Length: 89
- upload completely sent off: 89 out of 89 bytes
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
< WWW-Authenticate: Negotiate TlRMTVNTUAACAAAACgAKADgAAAA1goniEe/uEHN0OkAAAAAAAAAAALgAuABCAAAACgBjRQAAAA9RAEkAWABBAFMAAgAKAFEASQBYAEEAUwABABoAUQBEAFMALQBOAEEAVgBNAEgAVwBLADAAMwAEABwAcQBpAHgAYQBzAC4AaQBuAHQAZQByAG4AYQBsAAMAOABRAEQAUwAtAE4AQQBWAE0ASABXAEsAMAAzAC4AcQBpAHgAYQBzAC4AaQBuAHQAZQByAG4AYQBsAAUAHABxAGkAeABhAHMALgBpAG4AdABlAHIAbgBhAGwABwAIAKZdsyhHxNYBAAAAAA==
< Date: Thu, 26 Nov 2020 22:54:55 GMT
<
- Connection #0 to host qds-navmhwk03.qixas.internal left intact
- Issue another request to this URL: 'http://qds-navmhwk03.qixas.internal:7058/AD_BC140CU01/OData/Company('NHS')/Qwantify_Import_Lines?$format=json'
- Found bundle for host qds-navmhwk03.qixas.internal: 0x251c10c0e20 [can pipeline]
- Re-using existing connection! (#0) with host qds-navmhwk03.qixas.internal
- Connected to qds-navmhwk03.qixas.internal (172.30.20.65) port 7058 (#0)
- Server auth using Negotiate with user 'Qwantify'
POST /AD_BC140CU01/OData/Company('NHS')/Qwantify_Import_Lines?$format=json HTTP/1.1
Host: qds-navmhwk03.qixas.internal:7058
Authorization: Negotiate TlRMTVNTUAADAAAAGAAYAIYAAAB+AX4BngAAAAAAAABYAAAAEAAQAFgAAAAeAB4AaAAAABAAEAAcAgAANYKI4goAYUoAAAAPWG4q5cjLo6jgklPzUVl9CFEAdwBhAG4AdABpAGYAeQBEAEUAUwBLAFQATwBQAC0ASwA4AEIAQQBDAEkAUQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFyYJUa9TzMpI1QxTSIwEzAQEAAAAAAACmXbMoR8TWARnjOfkIH8UTAAAAAAIACgBRAEkAWABBAFMAAQAaAFEARABTAC0ATgBBAFYATQBIAFcASwAwADMABAAcAHEAaQB4AGEAcwAuAGkAbgB0AGUAcgBuAGEAbAADADgAUQBEAFMALQBOAEEAVgBNAEgAVwBLADAAMwAuAHEAaQB4AGEAcwAuAGkAbgB0AGUAcgBuAGEAbAAFABwAcQBpAHgAYQBzAC4AaQBuAHQAZQByAG4AYQBsAAcACACmXbMoR8TWAQYABAACAAAACAAwADAAAAAAAAAAAQAAAAAgAAAsUg5CIZOSJVbd/NreKLGp6n2JVAk2E9UVjeOHmizgqgoAEAAAAAAAAAAAAAAAAAAAAAAACQBCAEgAVABUAFAALwBxAGQAcwAtAG4AYQB2AG0AaAB3AGsAMAAzAC4AcQBpAHgAYQBzAC4AaQBuAHQAZQByAG4AYQBsAAAAAAAAAAAA42YkBSLuYBikiB93YhILYg==
User-Agent: curl/7.55.1
Accept: /
Content-Type: application/json
Content-Length: 89
However, when I try to POST with library in node I get a 400:
The code is just a slightly modified version of client-runas.js
const { sso } = require('node-expose-sspi');
const yargs = require('yargs');
const dbg = require('debug');
const debug = dbg('node-expose-sspi:client-runas');
const myArgv = yargs
.usage('$0 [url]', 'Request a url (by default http://localhost:3000)')
.option('url', {
type: 'string',
description: 'Absolute url',
default: 'http://qds-navmhwk03.qixas.internal:7058/AD_BC140CU01/OData/Company(\'NHS\')/Qwantify_Import_Lines?$format=json',
})
.option('target', {
alias: 't',
type: 'string',
description: 'Specify the target name (SPN)',
})
.option('ssp', {
alias: 's',
type: 'string',
description: 'Specify the SSP (Kerberos, NTLM, Negotiate)',
default: 'Negotiate',
})
.option('user', {
alias: 'u',
type: 'string',
description: 'Run as user',
default: 'Qwantify',
})
.option('password', {
alias: 'p',
type: 'string',
description: 'user password',
default: 'Q!xasQw4N!4#2',
})
.option('domain', {
alias: 'd',
type: 'string',
description: 'the windows domain',
default: 'Qixas',
})
.help()
.alias('h', 'help').argv;
async function main(argv) {
debug('argv: ', argv);
const url = argv.url;
const client = new sso.Client();
try {
if (argv.user !== undefined) {
client.setCredentials(argv.domain, argv.user, argv.password);
}
if (argv.target !== undefined) {
client.setTargetName(argv.target);
}
if (argv.ssp !== undefined) {
client.setSSP(argv.ssp);
}
const headers = {
"Content-Type": "application/json",
}
const data = {
LocationCode:"NHSC",
Deliver_to_Code:"WARD_01",
ItemNo:"015973",
CountQuantity:"6",
}
const init = {
method: 'POST',
headers: headers ,
body: data
}
const response = await client.fetch(url, init ) ;
debug('response: ', response);
if (response.status >= 400) {
throw new Error('fetch returned response with error ' + response.status);
}
const json = await response.json();
} catch (e) {
console.error(e);
}
}
main(myArgv);
results:
"C:\Program Files\nodejs\node.exe" C:\Users\joe\projects\qwantify_dbc365\src\client\basic_post.js
node-expose-sspi:client-runas argv: {
_: [],
url: "http://qds-navmhwk03.qixas.internal:7058/AD_BC140CU01/OData/Company('NHS')/Qwantify_Import_Lines?$format=json",
ssp: 'Negotiate',
s: 'Negotiate',
user: 'Qwantify',
u: 'Qwantify',
password: 'Q!xasQw4N!4#2',
p: 'Q!xasQw4N!4#2',
domain: 'Qixas',
d: 'Qixas',
'$0': 'src\client\basic_post.js'
} +0ms
node-expose-sspi:client start response.headers Headers {
[Symbol(map)]: [Object: null prototype] {
'content-length': [ '0' ],
server: [ 'Microsoft-HTTPAPI/2.0' ],
'www-authenticate': [ 'Negotiate' ],
date: [ 'Thu, 26 Nov 2020 23:03:40 GMT' ],
connection: [ 'close' ]
}
} +0ms
node-expose-sspi:client response.status 401 +0ms
node-expose-sspi:client cookieList: {} +0ms
node-expose-sspi:client starting negotiate auth +0ms
node-expose-sspi:client packageInfo: {
fCapabilities: '0x00883bb3',
wVersion: 1,
wRPCID: 9,
cbMaxToken: 48256,
Name: 'Negotiate',
Comment: 'Microsoft Package Negotiator'
} +1ms
node-expose-sspi:client credInput: {
packageName: 'Negotiate',
credentialUse: 'SECPKG_CRED_OUTBOUND',
authData: { domain: 'Qixas', user: 'Qwantify', password: 'Q!xasQw4N!4#2' }
} +0ms
node-expose-sspi:client Client running on a host that is not part of a Microsoft domain +0ms
node-expose-sspi:client targetName: whatever +1ms
node-expose-sspi:client wwwAuthenticateHeader: Negotiate +0ms
node-expose-sspi:client input: {
isFirstCall: true,
credential: '0x0000028cffcce250.0x00000191073a7770',
targetName: 'whatever',
contextReq: [
'ISC_REQ_CONNECTION',
'ISC_REQ_CONFIDENTIALITY',
'ISC_REQ_MUTUAL_AUTH',
'ISC_REQ_REPLAY_DETECT'
],
cbMaxToken: 48256,
targetDataRep: 'SECURITY_NATIVE_DREP'
} +0ms
node-expose-sspi:client clientSecurityContext: {
contextHandle: '0x0000028cff4d1ca0.0x000001910598bd00',
contextAttr: [ 'ISC_RET_INTERMEDIATE_RETURN' ],
SECURITY_STATUS: 'SEC_I_CONTINUE_NEEDED',
SecBufferDesc: { ulVersion: 0, buffers: [ [ArrayBuffer] ] }
} +3ms
node-expose-sspi:misc buffer length 40 +0ms
node-expose-sspi:client 0x00000000:4e 54 4c 4d 53 53 50 00 01 00 00 00 b7 82 08 e2 : NTLMSSP.........
node-expose-sspi:client 0x00000016:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : ................
node-expose-sspi:client 0x00000032:0a 00 61 4a 00 00 00 0f : ..aJ....
node-expose-sspi:client +0ms
node-expose-sspi:client debugObject: {
messageType: 'NEGOTIATE_MESSAGE (type 1)',
flags: 'UNICODE OEM NTLMSSP_REQUEST_TARGET SIGN SEAL LM_KEY NTLM ALWAYS_SIGN EXTENDED_SESSIONSECURITY VERSION 128 KEY_EXCH 56',
suppliedDomain: { length: 0, allocated: 0, offset: 0 },
suppliedWorkstation: { length: 0, allocated: 0, offset: 0 },
osVersionStructure: {
majorVersion: 10,
minorVersion: 0,
buildNumber: 19041,
unknown: 15
},
suppliedDomainData: '',
suppliedWorkstationData: ''
} +1ms
node-expose-sspi:client requestInit.headers {
'Content-Type': 'application/json',
Authorization: 'Negotiate TlRMTVNTUAABAAAAt4II4gAAAAAAAAAAAAAAAAAAAAAKAGFKAAAADw=='
} +1ms
node-expose-sspi:client response.status 401 +81ms
node-expose-sspi:client response.headers Headers {
[Symbol(map)]: [Object: null prototype] {
'content-length': [ '0' ],
server: [ 'Microsoft-HTTPAPI/2.0' ],
'www-authenticate': [
'Negotiate TlRMTVNTUAACAAAACgAKADgAAAA1goniktNOEHUoMVwAAAAAAAAAALgAuABCAAAACgBjRQAAAA9RAEkAWABBAFMAAgAKAFEASQBYAEEAUwABABoAUQBEAFMALQBOAEEAVgBNAEgAVwBLADAAMwAEABwAcQBpAHgAYQBzAC4AaQBuAHQAZQByAG4AYQBsAAMAOABRAEQAUwAtAE4AQQBWAE0ASABXAEsAMAAzAC4AcQBpAHgAYQBzAC4AaQBuAHQAZQByAG4AYQBsAAUAHABxAGkAeABhAHMALgBpAG4AdABlAHIAbgBhAGwABwAIAKaNUmFIxNYBAAAAAA=='
],
date: [ 'Thu, 26 Nov 2020 23:03:40 GMT' ]
}
} +0ms
node-expose-sspi:client cookieList: {} +90ms
node-expose-sspi:client wwwAuthenticateHeader: Negotiate TlRMTVNTUAACAAAACgAKADgAAAA1goniktNOEHUoMVwAAAAAAAAAALgAuABCAAAACgBjRQAAAA9RAEkAWABBAFMAAgAKAFEASQBYAEEAUwABABoAUQBEAFMALQBOAEEAVgBNAEgAVwBLADAAMwAEABwAcQBpAHgAYQBzAC4AaQBuAHQAZQByAG4AYQBsAAMAOABRAEQAUwAtAE4AQQBWAE0ASABXAEsAMAAzAC4AcQBpAHgAYQBzAC4AaQBuAHQAZQByAG4AYQBsAAUAHABxAGkAeABhAHMALgBpAG4AdABlAHIAbgBhAGwABwAIAKaNUmFIxNYBAAAAAA== +1ms
node-expose-sspi:client bufferStr: TlRMTVNTUAACAAAACgAKADgAAAA1goniktNOEHUoMVwAAAAAAAAAALgAuABCAAAACgBjRQAAAA9RAEkAWABBAFMAAgAKAFEASQBYAEEAUwABABoAUQBEAFMALQBOAEEAVgBNAEgAVwBLADAAMwAEABwAcQBpAHgAYQBzAC4AaQBuAHQAZQByAG4AYQBsAAMAOABRAEQAUwAtAE4AQQBWAE0ASABXAEsAMAAzAC4AcQBpAHgAYQBzAC4AaQBuAHQAZQByAG4AYQBsAAUAHABxAGkAeABhAHMALgBpAG4AdABlAHIAbgBhAGwABwAIAKaNUmFIxNYBAAAAAA== +0ms
node-expose-sspi:client responseToken: {
messageType: 'CHALLENGE_MESSAGE (type 2)',
targetNameSecBuf: { length: 10, allocated: 10, offset: 56 },
flags: 'UNICODE NTLMSSP_REQUEST_TARGET SIGN SEAL NTLM ALWAYS_SIGN NTLMSSP_TARGET_TYPE_DOMAIN EXTENDED_SESSIONSECURITY TARGET_INFO VERSION 128 KEY_EXCH 56',
challenge: '92d34e107528315c',
targetNameData: 'QIXAS',
context: '0000000000000000',
targetInfoSecBuf: { length: 184, allocated: 184, offset: 66 },
targetInfoData: [
{ type: 2, length: 10, content: 'QIXAS' },
{ type: 1, length: 26, content: 'QDS-NAVMHWK03' },
{ type: 4, length: 28, content: 'qixas.internal' },
{ type: 3, length: 56, content: 'QDS-NAVMHWK03.qixas.internal' },
{ type: 5, length: 28, content: 'qixas.internal' },
{ type: 7, length: 8, content: '2020-11-26T23:03:40.349Z' },
{ type: 0, length: 0, content: '' }
],
osVersionStructure: {
majorVersion: 10,
minorVersion: 0,
buildNumber: 17763,
unknown: 15
}
} +0ms
node-expose-sspi:client input: {
isFirstCall: false,
credential: '0x0000028cffcce250.0x00000191073a7770',
targetName: 'whatever',
contextReq: [
'ISC_REQ_CONNECTION',
'ISC_REQ_CONFIDENTIALITY',
'ISC_REQ_MUTUAL_AUTH',
'ISC_REQ_REPLAY_DETECT'
],
cbMaxToken: 48256,
targetDataRep: 'SECURITY_NATIVE_DREP',
SecBufferDesc: { ulVersion: 0, buffers: [ [ArrayBuffer] ] },
contextHandle: '0x0000028cff4d1ca0.0x000001910598bd00'
} +1ms
node-expose-sspi:client clientSecurityContext: {
contextHandle: '0x0000028cff4d1ca0.0x000001910598bd00',
contextAttr: [
'ISC_RET_MUTUAL_AUTH',
'ISC_RET_REPLAY_DETECT',
'ISC_RET_SEQUENCE_DETECT',
'ISC_RET_CONFIDENTIALITY',
'ISC_RET_INTEGRITY'
],
SECURITY_STATUS: 'SEC_E_OK',
SecBufferDesc: { ulVersion: 0, buffers: [ [ArrayBuffer] ] }
} +1ms
node-expose-sspi:misc buffer length 516 +86ms
node-expose-sspi:client 0x00000000:4e 54 4c 4d 53 53 50 00 03 00 00 00 18 00 18 00 : NTLMSSP.........
node-expose-sspi:client 0x00000016:90 00 00 00 4c 01 4c 01 a8 00 00 00 0a 00 0a 00 : ....L.L.........
node-expose-sspi:client 0x00000032:58 00 00 00 10 00 10 00 62 00 00 00 1e 00 1e 00 : X.......b.......
node-expose-sspi:client 0x00000048:72 00 00 00 10 00 10 00 f4 01 00 00 35 82 88 e2 : ............5...
node-expose-sspi:client 0x00000064:0a 00 61 4a 00 00 00 0f 29 02 12 67 6c 5d d0 88 : ..aJ.......gl...
node-expose-sspi:client 0x00000080:f3 3e 86 d2 a1 ff 2e ea 51 00 69 00 78 00 61 00 : ........Q.i...a.
node-expose-sspi:client 0x00000096:73 00 51 00 77 00 61 00 6e 00 74 00 69 00 66 00 : ..Q...a.n...i.f.
node-expose-sspi:client 0x00000112:79 00 44 00 45 00 53 00 4b 00 54 00 4f 00 50 00 : ..D.E.S.K.T.O.P.
node-expose-sspi:client 0x00000128:2d 00 4b 00 38 00 42 00 41 00 43 00 49 00 51 00 : ..K.8.B.A.C.I.Q.
node-expose-sspi:client 0x00000144:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : ................
node-expose-sspi:client 0x00000160:00 00 00 00 00 00 00 00 02 33 f5 42 c1 47 c0 3d : .........3.B.GÀ.
node-expose-sspi:client 0x00000176:25 18 64 0a 04 df cf 7d 01 01 00 00 00 00 00 00 : ..d.............
node-expose-sspi:client 0x00000192:a6 8d 52 61 48 c4 d6 01 88 c2 c6 6b 17 b0 d9 56 : ..RaH......k...V
node-expose-sspi:client 0x00000208:00 00 00 00 02 00 0a 00 51 00 49 00 58 00 41 00 : ........Q.I.X.A.
node-expose-sspi:client 0x00000224:53 00 01 00 1a 00 51 00 44 00 53 00 2d 00 4e 00 : S.....Q.D.S...N.
node-expose-sspi:client 0x00000240:41 00 56 00 4d 00 48 00 57 00 4b 00 30 00 33 00 : A.V.M.H.W.K.0.3.
node-expose-sspi:client 0x00000256:04 00 1c 00 71 00 69 00 78 00 61 00 73 00 2e 00 : ......i...a.....
node-expose-sspi:client 0x00000272:69 00 6e 00 74 00 65 00 72 00 6e 00 61 00 6c 00 : i.n...e...n.a.l.
node-expose-sspi:client 0x00000288:03 00 38 00 51 00 44 00 53 00 2d 00 4e 00 41 00 : ..8.Q.D.S...N.A.
node-expose-sspi:client 0x00000304:56 00 4d 00 48 00 57 00 4b 00 30 00 33 00 2e 00 : V.M.H.W.K.0.3...
node-expose-sspi:client 0x00000320:71 00 69 00 78 00 61 00 73 00 2e 00 69 00 6e 00 : ..i...a.....i.n.
node-expose-sspi:client 0x00000336:74 00 65 00 72 00 6e 00 61 00 6c 00 05 00 1c 00 : ..e...n.a.l.....
node-expose-sspi:client 0x00000352:71 00 69 00 78 00 61 00 73 00 2e 00 69 00 6e 00 : ..i...a.....i.n.
node-expose-sspi:client 0x00000368:74 00 65 00 72 00 6e 00 61 00 6c 00 07 00 08 00 : ..e...n.a.l.....
node-expose-sspi:client 0x00000384:a6 8d 52 61 48 c4 d6 01 06 00 04 00 02 00 00 00 : ..RaH...........
node-expose-sspi:client 0x00000400:08 00 30 00 30 00 00 00 00 00 00 00 01 00 00 00 : ..0.0...........
node-expose-sspi:client 0x00000416:00 20 00 00 2c 52 0e 42 21 93 92 25 56 dd fc da : . ...R.B....VÝ..
node-expose-sspi:client 0x00000432:de 28 b1 a9 ea 7d 89 54 09 36 13 d5 15 8d e3 87 : Þ......T.6......
node-expose-sspi:client 0x00000448:9a 2c e0 aa 0a 00 10 00 00 00 00 00 00 00 00 00 : ................
node-expose-sspi:client 0x00000464:00 00 00 00 00 00 00 00 09 00 10 00 77 00 68 00 : ..............h.
node-expose-sspi:client 0x00000480:61 00 74 00 65 00 76 00 65 00 72 00 00 00 00 00 : a...e...e.......
node-expose-sspi:client 0x00000496:00 00 00 00 2e 96 11 82 bc 29 a5 66 eb 63 3e 8e : ........¼..f.c..
node-expose-sspi:client 0x00000512:1c 1b 1d e9 : ....
node-expose-sspi:client +0ms
node-expose-sspi:client debugObject: {
messageType: 'NEGOTIATE_MESSAGE (type 3)',
version: 3,
lmResponse: { length: 24, allocated: 24, offset: 144 },
ntlmResponse: { length: 332, allocated: 332, offset: 168 },
targetName: { length: 10, allocated: 10, offset: 88 },
userName: { length: 16, allocated: 16, offset: 98 },
workstationName: { length: 30, allocated: 30, offset: 114 },
lmResponseData: { hex: '000000000000000000000000000000000000000000000000' },
ntlmResponseData: {
hex: '0233f542c147c03d2518640a04dfcf7d0101000000000000a68d526148c4d60188c2c66b17b0d9560000000002000a005100490058004100530001001a005100440053002d004e00410056004d00480057004b003000330004001c00710069007800610073002e0069006e007400650072006e0061006c00030038005100440053002d004e00410056004d00480057004b00300033002e00710069007800610073002e0069006e007400650072006e0061006c0005001c00710069007800610073002e0069006e007400650072006e0061006c0007000800a68d526148c4d601060004000200000008003000300000000000000001000000002000002c520e422193922556ddfcdade28b1a9ea7d8954093613d5158de3879a2ce0aa0a0010000000000000000000000000000000000009001000770068006100740065007600650072000000000000000000'
},
targetNameData: 'Qixas',
userNameData: 'Qwantify',
workstationNameData: 'DESKTOP-K8BACIQ',
sessionKey: { length: 16, allocated: 16, offset: 500 },
flags: 'UNICODE NTLMSSP_REQUEST_TARGET SIGN SEAL NTLM ALWAYS_SIGN EXTENDED_SESSIONSECURITY TARGET_INFO VERSION 128 KEY_EXCH 56',
osVersionStructure: {
majorVersion: 10,
minorVersion: 0,
buildNumber: 19041,
unknown: 15
}
} +1ms
node-expose-sspi:client requestInit.headers {
'Content-Type': 'application/json',
Authorization: 'Negotiate TlRMTVNTUAADAAAAGAAYAJAAAABMAUwBqAAAAAoACgBYAAAAEAAQAGIAAAAeAB4AcgAAABAAEAD0AQAANYKI4goAYUoAAAAPKQISZ2xd0IjzPobSof8u6lEAaQB4AGEAcwBRAHcAYQBuAHQAaQBmAHkARABFAFMASwBUAE8AUAAtAEsAOABCAEEAQwBJAFEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjP1QsFHwD0lGGQKBN/PfQEBAAAAAAAApo1SYUjE1gGIwsZrF7DZVgAAAAACAAoAUQBJAFgAQQBTAAEAGgBRAEQAUwAtAE4AQQBWAE0ASABXAEsAMAAzAAQAHABxAGkAeABhAHMALgBpAG4AdABlAHIAbgBhAGwAAwA4AFEARABTAC0ATgBBAFYATQBIAFcASwAwADMALgBxAGkAeABhAHMALgBpAG4AdABlAHIAbgBhAGwABQAcAHEAaQB4AGEAcwAuAGkAbgB0AGUAcgBuAGEAbAAHAAgApo1SYUjE1gEGAAQAAgAAAAgAMAAwAAAAAAAAAAEAAAAAIAAALFIOQiGTkiVW3fza3iixqep9iVQJNhPVFY3jh5os4KoKABAAAAAAAAAAAAAAAAAAAAAAAAkAEAB3AGgAYQB0AGUAdgBlAHIAAAAAAAAAAAAulhGCvCmlZutjPo4cGx3p'
} +1ms
node-expose-sspi:client response.status 400 +46ms
node-expose-sspi:client response.headers Headers {
[Symbol(map)]: [Object: null prototype] {
'content-length': [ '113' ],
'content-type': [
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8'
],
server: [ 'Microsoft-HTTPAPI/2.0' ],
'x-content-type-options': [ 'nosniff' ],
dataserviceversion: [ '3.0;' ],
date: [ 'Thu, 26 Nov 2020 23:03:40 GMT' ]
}
} +1ms
node-expose-sspi:client cookieList: {} +52ms
node-expose-sspi:client handleAuth: end +1ms
node-expose-sspi:client-runas response: Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: {
body: PassThrough {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
[Symbol(kCapture)]: false,
[Symbol(kTransformState)]: [Object]
},
disturbed: false,
error: null
},
[Symbol(Response internals)]: {
url: 'http://qds-navmhwk03.qixas.internal:7058/AD_BC140CU01/OData/Company(%27NHS%27)/Qwantify_Import_Lines?$format=json',
status: 400,
statusText: 'Bad Request',
headers: Headers { [Symbol(map)]: [Object: null prototype] },
counter: 0
}
} +222ms
Error: fetch returned response with error 400
at main (C:\Users\joe\projects\qwantify_dbc365\src\client\basic_post.js:86:19)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Process finished with exit code 0
I can't figure out what's going wrong. It's authenticating correctly I"m pretty sure, but I don't know why I"m getting a 400?