Homework-of-Python
Homework-of-Python copied to clipboard
[bug]findpeople has 1000 limit
findallpeople in the ewsManage.py use m:FindPeople ,buy the way has 1000 limit, need to paging work。can you fix it?thank you!
Reference: https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/ews-throttling-in-exchange https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-perform-paged-searches-by-using-ews-in-exchange
findallpeople in the ewsManage.py use m:FindPeople:
<m:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="1000" Offset="0"/>
You can just set the "offset" to 1000 for the next search.
And my code avoids the bug in this way:
https://github.com/3gstudent/Homework-of-Python/blob/master/ewsManage.py#L1275
Each letter is used as the search criteria and this will narrow the search results.
If the scope is still insufficient, the scope can be reduced again.
Like this:
for i in range(97,123):
for j in range(97,123):
ewsManage_findallpeople(sys.argv[1], int(sys.argv[2]), sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], chr(i))