How to get all users from Exchange with EWS

前端 未结 2 1843
梦如初夏
梦如初夏 2021-01-24 19:40

I would like to get all users from xchange server with EWS. I have figured out how to get all rooms and all appointments. But I specifically need all users thus I can CRUD users

2条回答
  •  迷失自我
    2021-01-24 19:52

    On Exchange 2013 and above you can use the FindPeople operation with the GUID of the address list you want to access (eg for the Global Address List you use the GAL's guid).

        
        
          
            
          
          
            
              
              
                
              
            
          
        
    

    You can then page the results back using the Offset

    The one catch with this is you can't get the GUID you need using EWS you need to use the Get-GlobalAddressList cmdlet https://technet.microsoft.com/en-us/library/aa996579(v=exchg.160).aspx in Exchange Management Shell which will return the GUID you need for the request.

    Cheers Glen

提交回复
热议问题