How to get a Bearer Token from Citrix Cloud for API access, using PowerShell

Wanted to share a quick PowerShell code snippet.

I used this to get a Bearer Token from the Citrix Cloud API trust service using PowerShell.

It’s not beautiful, but it gets the job done.

Ingredients

You’ll need:

  • The clientID and clientSecret from your Citrix Cloud customer API client (how to do that is here)
  • Your customerID for your Citrix Cloud instance

Then put those in-between the relevant quotation marks in the code snippet 🙂

PowerShell code snippet