Connect-PSUServer after switching to OIDC

We are trying to connect to the PSU server after switching from Windows auth to OIDC but are running into the following error when trying to run Connect-PSUServer.

" [Response could not be deserialized to JSON"

We’ve tried changing Connect-PSUServer to use the app token but still have the same error. Previously it was set to “-UseDefaultCredentials” with windows auth and working.

The windows service is using a service account.

Anyone have a fix for this issue?

Product: PowerShell Universal
Version: 5.2.0

I am dealing with this same issue. I thought it was just me.

@adam

{
    "Kestrel": {
        "Endpoints": {
            "HTTPS": {
                "Url": "https://*:443",
                "Certificate": {
                    "Subject": "localhost",
                    "Store": "My",
                    "Location": "LocalMachine",
                    "AllowInvalid": "true"
                }
            }
        }
    },
    "Plugins": [
        "SQLite",
        "PowerShellUniversal.Plugin.OpenTelemetry"
    ],
    "Data": {
        "RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
        "ConnectionString": "Data Source=%ProgramData%\\UniversalAutomation\\database.db"
    },
    "OpenTelemetry": {
        "Otlp": {
            "Endpoint": "http://localhost:9090/api/v1/otlp/v1/metrics"
        }
    },
    "Profiling": true
}

 connect-psuServer -ComputerName https://localhost -AppToken $env:PSU_TOKEN
Connect-PSUServer: Call failed. The SSL connection could not be established, see inner exception. GET https://localhost/api/v1/accessible
 connect-psuServer -ComputerName http://localhost:5000 -AppToken $env:PSU_TOKEN
Connect-PSUServer: Response could not be deserialized to JSON: GET http://localhost:5000/api/v1/accessible
 connect-psuServer -ComputerName http://localhost:5000 -AppToken $env:PSU_TOKEN -Debug
Connect-PSUServer: Response could not be deserialized to JSON: GET http://localhost:5000/api/v1/accessible
 connect-psuServer -ComputerName http://localhost:5000 -AppToken $env:PSU_TOKEN -Verbose
Connect-PSUServer: Response could not be deserialized to JSON: GET http://localhost:5000/api/v1/accessible

I am running v4.5.3

I know we have integration tests to validate this behavior works v5 as of 5.5.5 but I wouldn’t be surprised this is still an issue in v4. I will open an issue.

1 Like

Thanks Adam,

I think at this point we should be looking at migrating to v5

1 Like

@adam

is there a work around or something else I could do to get this to work while being on v4 still?

I’m not sure and will have to try on v4. It could be an order of operations thing within PSU that is causing the problem and might not work with a bug fix.

1 Like