How to retrieve your Citrix CWSAuth bearer token

How to retrieve your Citrix CWSAuth bearer token

book

Article ID: CTX330675

calendar_today

Updated On:

Description

Certain Citrix Cloud/Citrix Virtual Apps and Desktop service PowerShell based automation requires access to CWSAuth bearer token.


Instructions

How to retrieve your CWSAuth bearer token?

Instructions:

Retrieve bearer token using Remote PowerShell SDK
  1. From a machine which has Remote PowerShell SDK installed, launch a new PowerShell session
  2. Use Get-XDAuthentication to login to your Citrix Cloud account.
  3. The bearer token is stored as the XDAuthToken variable. To retrieve it use the $GLOBAL:XDAuthToken command.
  4. The bearer token (starts after the ‘=’ character) is displayed in the PowerShell window.
Picture1.png

Retrieve bearer token using a browser
  1. Login to your Citrix Cloud account.
  2. Using the browsers’ menu options, open developer tools.
  3. Navigate to Application  Storage  Local Storage.
  4. Locate the cloud.com URL (as in the screenshot below).
  5. Copy the value for cwcBearerToken.
token.png