Failed to connect to PowerShell Universal

Hi,

I’ve downloaded and installed the MSI and the service is running and I can log in to the web portal.
I’ve then downloaded and added the VS code extension. My Admin account doesn’t have internet access.
I’ve generated an app token, kept it as localhost as VS code is on the same machine and port 5000.
But when I launch the extension, it says

“Failed to connect to PowerShell Universal. You can configure the connection information in settings.”

I can see the correct URL in the bottom left “connecting to PowerShell universal at http://localhost:5000…”

Are there any debug logs I could use to find out why its not connecting?

Thanks

Can you try running this in a PS Prompt?

Invoke-WebRequest http://localhost:5000/api/v1/accessible -Headers @{ Authorization = "Bearer <apptoken>" }

Hi Adam,

Yes sure I get:

tatusCode : 200
StatusDescription : OK
Content : {“username”:“Admin”,“roles”:[“Administrator”,“Operator”,“Reader”]}
RawContent : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 15 Oct 2020 15:28:18 GMT
Server: Kestrel

                {"username":"Admin","roles":["Administrator","Operat...

Forms : {}
Headers : {[Transfer-Encoding, chunked], [Content-Type, application/json; charset=utf-8], [Date, Thu, 15 Oct 2020 15:28:18 GMT], [Server, Kestrel]}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 66