I am trying to connect to a Neo4j via Invoke-RestMethod (PowerShell versions 3,4,5).
Based on web recommendations, I am setting URI: $Uri = "http://localhost:7474/db/data/cypher"
... followed by a call to invoke rest method (POST or GET, does not matter)
Invoke-RestMethod -Uri $Uri -Method Post -Body $Body -ContentType 'application/json'
Message I get is:
System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
I tried putting in http://userId/pwd@localhost:7474.... but the error is the same.
Is there another way to pass authentication information to Neo4j?
Disabling security is not an option.
Thank you!
--Alex