private static void ListProjectPermissionsForAgency(IamClient iamClient) { var listPermissionsForAgencyOnProjectRequest = new ListProjectPermissionsForAgencyRequest() { ProjectId = "", AgencyId = "" }; try { var listPermissionsForAgencyOnProjectResponse = iamClient.ListProjectPermissionsForAgency(listPermissionsForAgencyOnProjectRequest); foreach (var role in listPermissionsForAgencyOnProjectResponse.Roles) { Console.WriteLine(JsonConvert.SerializeObject(role)); } } 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); } }