OfficeDev / ews-java-api

A java client library to access Exchange web services. The API works against Office 365 Exchange Online as well as on premises Exchange.
MIT License
869 stars 560 forks source link

Is there any JAVA API for retrieving all the mail boxes from an exchange server (like getsearchablemailboxes) #673

Closed perusrikanth closed 5 years ago

perusrikanth commented 6 years ago

How to get all the mail boxes from an exchange server using JAVA API.

pavelnt commented 6 years ago

GetSearchableMailboxes operation has appeared in Exchange 2013. This operation is not added to EWS Java API yet. I'm afraid there is no another way to get mailboxes through API.

sunny02chaurasia commented 6 years ago

You can use EWS Java API to pull the mail box details from an account.

perusrikanth commented 5 years ago

NO EWS Java API found for GetSearchableMailboxes

iamdeadman commented 5 years ago

So, what alternatives are there other than the Java API for querying the list of mailboxes. I have to setup a cloud service app in which I need to subscribe to push notifications daily for all the mailboxes so I need to be able to query the updated list of mailboxes every time I run the lambda

perusrikanth commented 5 years ago

Getting list of mailboxes is available in C#, C++ and PHP C# - public Microsoft.Exchange.WebServices.Data.GetSearchableMailboxesResponse GetSearchableMailboxes (string searchFilter, bool expandGroupMembership); C++ - Microsoft::Exchange::WebServices::Data::GetSearchableMailboxesResponse ^ GetSearchableMailboxes(System::String ^ searchFilter, bool expandGroupMembership); More details at - https://docs.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.exchangeservice.getsearchablemailboxes?redirectedfrom=MSDN&view=exchange-ews-api#Microsoft_Exchange_WebServices_Data_ExchangeService_GetSearchableMailboxes_System_String_System_Boolean_

For PHP, refer - https://github.com/jamesiarmes/php-ews