none
EWS Java API - Problems getting delegate permissions RRS feed

  • Question

  • Hi, i want to get the delegate permissions of a user using Ews Java Api. I have set some permissions for that user in outlook but with this code I get “None” for all permissionlevels.

    Whats wrong with that code or is it a bug in Ews Java Api 1.1.5?

     

    DelegateInformation delegateInformation = service.getDelegates(mailbox, true, userId);
    
          Collection<DelegateUserResponse> delegateUserResponses = delegateInformation.getDelegateUserResponses();
    
          Iterator it = delegateUserResponses.iterator();
    
          while(it.hasNext()){
    
            DelegateUserResponse delegateUserResponse = (DelegateUserResponse) it.next();
    
            DelegateUser delegateUser = delegateUserResponse.getDelegateUser();
    
            DelegatePermissions delegatePermissions = delegateUser.getPermissions();
    
            boolean receiveCopiesOfMeetingMessages = delegateUser.getReceiveCopiesOfMeetingMessages();
    
            boolean viewPrivateItems = delegateUser.getViewPrivateItems();
    
            DelegateFolderPermissionLevel contactsFolderPermissionLevel = delegatePermissions.getContactsFolderPermissionLevel();
    
            DelegateFolderPermissionLevel calendarFolderPermissionLevel = delegatePermissions.getCalendarFolderPermissionLevel();
    
            DelegateFolderPermissionLevel inboxFolderPermissionLevel = delegatePermissions.getInboxFolderPermissionLevel();
    
            DelegateFolderPermissionLevel taskFolderPermissionLevel = delegatePermissions.getTasksFolderPermissionLevel();
    
            System.out.println("Contacts: "+contactsFolderPermissionLevel);//output: None
    
            System.out.println("Calendar: "+calendarFolderPermissionLevel); //output: None
    
            System.out.println("Mails: "+inboxFolderPermissionLevel); //output: None
    
            System.out.println("Tasks: "+taskFolderPermissionLevel); //output: None
    
          }
    Thanks in advance
    Tuesday, April 3, 2012 4:55 PM

All replies

  • The updateDelegates method of Ews Java Api works fine. I can see the changes in outlook. But getting the folder permissions always returns "None". Has someone get this to work?
    Wednesday, April 4, 2012 12:00 PM