Jump to content
Updated Privacy Statement
  • 0

Attempting to use CVAD REST API fails to obtain token with error 404


Bill Powell1709164126

Question

Starting from https://developer-docs.citrix.com/en-us/citrix-virtual-apps-desktops/citrix-cvad-rest-apis/citrix-virtual-apps-and-desktops-apis I'm attempting to obtain a token from the endpoint https://xxxx.yyyy.zz/cvad/manage/Tokens where xxxx.yyyy.zz is the DNSHostName of either of my DDCs (as obtained from Get-ADComputer). 
My (powershell) code is :

 

    try {
        $TokenResponse = Invoke-RestMethod -Uri $tokenUrl -Method POST -Body @{
            Accept = "application/json"
            Authorization = "Basic $EncodedAdminCredentical"
        }
        $token = $TokenResponse.Content | ConvertFrom-Json
        Write-Host -ForegroundColor Green "Request token to $tokenUrl succeeded"
    }
    catch {
        $exception = $_
        Write-Host -ForegroundColor Yellow "Request token to $tokenUrl rejected: $($exception.Exception.Message)"
    }

 

The error is "The remote server returned an error: (404) Not Found."
I take that to indicate that the cvad/manage/Tokens endpoint isn't recognised. I also tried changing the -Body to -Headers (with the same 404 failure code resulting)

The DDC has 'Citrix Virtual Apps and Desktops 7 2203 LTSR CU2' installed. The version is '2203.0.2000.2076'

Any guidance as to what I'm doing wrong?

Edited by Bill Powell
omitted to mention programming language
Link to comment

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...