Jump to content
Welcome to our new Citrix community!
  • 0

Citrix Cloud SDK


Question

Hi all,

I have written a small piece of PowerShell code for authenticating into Citrix Cloud and extract the list of Delivery Groups:

asnp Citrix*

$deliverygroups = Get-BrokerDesktopGroup

    foreach ($deliverygroup in $deliverygroups)
    {
        # Building Properties for each application
        
        $Properties = @{
            DeliveryGroupName = $deliverygroup.Name
        }
        
        Write-Host $deliverygroup.Name
    }

This code works correctly if I run it via Powershell ISE, but not works when I run it via SAPIEN Powershell Studio.

In particular, the authentication doesn't terminate and I don't have the possibility o select the customer for executes the Delivery Groups extraction (I'm enabled to many customers and after the insert of username and password normally I have a menu for the customer selection).

If I run this code via PowerShell ISE, I have correctly the possibility to select the customer and receive the extraction of Delivery Groups.

Powershell ISE and SAPIEN Powershell Studio run the code in 64bit and RunAs Administrator.

 

Thank you

 

Silvio

Link to comment

1 answer to this question

Recommended Posts

  • 0

Hi Silvio, would recommend to use API Secure Client credentials if you are using non MS integrated IDE. I believe you may be seeing this behavior is that Sapien IDE may not be caching the credentials from IE cache correctly. But if you use the secure client credentials, you will be able to  authenticate for that PS session within the session.

 

You can setup secure client in Citrix Cloud dashboard, go to Identity and Access Management -> API Access. Create a secure client and download it. Then you can use the following command to authenticate using the client credentials:

Set-XDCredentials -CustomerId <CustomerID> -SecureClientFile <Path to Secure Client file> -ProfileType CloudApi -StoreAs mysession

CustomerID is shown in the API Access page where you create the secure client.

Link to comment

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...