When attempting to setup Session Recording Server from within Citrix Cloud portal as per https://docs.citrix.com/en-us/session-recording/service/get-started/install-session-recording-servers-from-within-the-cloud.html , the installation fails with the error "Citrix Session Recording Cloud Client Service Setup Failed". The cloudClientServiceInstall.log file showed the following exception:
Calling custom action CustomAction!SRCustomAction.CustomActions.CreatePrivateKey
Begin CreatePrivateKey
Exception occured in CreatePrivateKey : System.AggregateException: One or more errors occurred. ---> Citrix.CloudServices.Trust.Api.TrustClientException: Bad Request
at Citrix.CloudServices.Trust.Api.TrustClient.<AsJson>d__43`1.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at SRCustomAction.SetupTools.AuthenticateCwsUser.GetCwsToken(String uri, String clientId, String clientSecret)
at SRCustomAction.SetupTools.AuthenticateCwsUser.GetCwsToken(InstallAuthenticationModel installAuthenticationModel)
at SRCustomAction.SetupTools.AuthenticateCwsUser.ManageNewInstall(InstallAuthenticationModel installAuthenticationModel, IDictionary`2 properties)
at SRCustomAction.SetupTools.AuthenticateCwsUser.Execute()
at SRCustomAction.CustomActions.CreatePrivateKey(Session session)
---> (Inner Exception #0) Citrix.CloudServices.Trust.Api.TrustClientException: Bad Request
at Citrix.CloudServices.Trust.Api.TrustClient.<AsJson>d__43`1.MoveNext()<---
CustomAction CreatePrivateKey returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Configuration issue
The format for the ProxyServer command line parameter was changed from PROXYSERVER= x.x.x.x:443 to PROXYSERVER=http://x.x.x.x
It was also found that when generating the command line in the cloud portal (as per https://docs.citrix.com/en-us/session-recording/service/get-started/install-session-recording-servers-from-within-the-cloud.html#installation-steps ), the administrator was manually copying the command line from the window. So the ClientSecret was copied as a literal ************ instead of actual ClientSecret. Administrator should use the "Copy" option seen in the window instead.

When installing Session Recording Server from Citrix Cloud, installation fails with the error "Citrix Session Recording Cloud Client Service Setup Failed"