How to get all available recipient e-mail address from office 365 using managed Exchange web services (EWS)? RRS feed

  • Question

  • Hi Team,

    Currently i am getting top 100 list of recipient email addresses using below method.

    var nameResolutionCollection = Exchnageservice.ResolveName("SMTP:");

    But we have more than 100 recipients in my office 365 exchange server.

    Is there any way to get the more than 100 recipient email address using EWS api?

    Thank u in advance.



    Monday, September 25, 2017 2:13 PM

All replies

  • 100 in the limit with ResolveName, a few workarounds are to use a group and add the user you want to that group then expand the group. getSearchableMailboxes will return all the Mailboxes, You can use FindPeople . 

    But my suggestion would be you use the Graph API or the People Preview


    Tuesday, September 26, 2017 12:04 AM
  • Hi Glen,

    Thank you so much for your reply.

    i have created one group in office 365 with the group id "" and assigned one user( to the this group, after this configuration i trying to get the users from this group by using getSearchableMailboxes  method, but it returns only the one item in searchablemailbox property ie "", this method didn't return the members in this group.

      var response = ExchangeService.GetSearchableMailboxes("", true);

    Do i need to do any configuration to get all members in group in exchange online?

    And also according to your suggestion i have tried to use graph api but it needs the Bearer token.

    How do i get the Bearer token for my windows application?

    And also i am currently using the developer office 365 trial account.



    Tuesday, September 26, 2017 6:28 AM
  • You should be using ExpandGroup if you want to use the Group method.

    For the Graph API start here which takes you through everything.

    Tuesday, September 26, 2017 9:33 PM