This documentation provides details about the GetSearchableMailboxes class within the pyews package.

This class is used to retrieve all searchable mailboxes that the user configuration has access to search.

Identifies all searchable mailboxes based on the provided UserConfiguration object’s permissions


To use any service class you must provide a UserConfiguration object first.

You can acquire

from pyews import UserConfiguration
from pyews import GetSearchableMailboxes

userconfig = UserConfiguration(

searchable_mailboxes = GetSearchableMailboxes(userconfig).run()

If you want to use a property from this object with another class then you can iterate through the list of of mailbox properties. For example, if used in conjunction with the SearchMailboxes you first need to create a list of mailbox reference_ids.

id_list = []
for id in
searchResults = SearchMailboxes(userconfig).run('subject:"Phishing Email Subject"', id_list)
userconfiguration (UserConfiguration): A UserConfiguration object created using the UserConfiguration class