private static void KeystoneListGroupsForUser(IamClient iamClient) { var keystoneListGroupsForUserRequest = new KeystoneListGroupsForUserRequest() { UserId = "" }; try { var keystoneListGroupsForUserResponse = iamClient.KeystoneListGroupsForUser(keystoneListGroupsForUserRequest); foreach (var group in keystoneListGroupsForUserResponse.Groups) { Console.WriteLine(JsonConvert.SerializeObject(group)); } } catch (RequestTimeoutException requestTimeoutException) { Console.WriteLine(requestTimeoutException.ErrorMessage); } catch (ServiceResponseException clientRequestException) { Console.WriteLine(clientRequestException.HttpStatusCode); Console.WriteLine(clientRequestException.ErrorCode); Console.WriteLine(clientRequestException.ErrorMsg); } catch (ConnectionException connectionException) { Console.WriteLine(connectionException.ErrorMessage); } }