Integrations/MicrosoftGraphMail/MicrosoftGraphMail.py
def list_mails(self, user_id: str, folder_id: str = '', search: str = None, odata: str = None) -> Union[dict, list]:
        """Returning all mails from given user

        Args:
            user_id (str):
            folder_id (str):
            search (str):
            odata (str):

        Returns:
            dict or list:
        """
        no_folder = f'/users/{user_id}/messages/'
        with_folder = f'/users/{user_id}/{build_folders_path(folder_id)}/messages/'
        pages_to_pull = demisto.args().get('pages_to_pull', 1)

        if search:
            odata = f'?{odata}$search={search}' if odata else f'?$search={search}'
        suffix = with_folder if folder_id else no_folder
        if odata:
            suffix += odata
        response = self.ms_client.http_request('GET', suffix)
        return self.pages_puller(response, assert_pages(pages_to_pull))
Returning all mails from given user

        Args:
            user_id (str):
            folder_id (str):
            search (str):
            odata (str):

        Returns:
            dict or list:
        
Returning all mails from given user
Returning all mails from given user
def list_mails(self, user_id: str, folder_id: str = '', search: str = None, odata: str = None) -> Union[dict, list]:
        no_folder = f'/users/{user_id}/messages/'
        with_folder = f'/users/{user_id}/{build_folders_path(folder_id)}/messages/'
        pages_to_pull = demisto.args().get('pages_to_pull', 1)
        if search:
            odata = f'?{odata}$search={search}' if odata else f'?$search={search}'
        suffix = with_folder if folder_id else no_folder
        if odata:
            suffix += odata
        response = self.ms_client.http_request('GET', suffix)
        return self.pages_puller(response, assert_pages(pages_to_pull))
def list_mails ( self , user_id : str , folder_id : str = '' , search : str = None , odata : str = None ) -> Union [ dict , list ] : no_folder = f'/users/{user_id}/messages/' with_folder = f'/users/{user_id}/{build_folders_path(folder_id)}/messages/' pages_to_pull = demisto . args ( ) . get ( 'pages_to_pull' , 1 ) if search : odata = f'?{odata}$search={search}' if odata else f'?$search={search}' suffix = with_folder if folder_id else no_folder if odata : suffix += odata response = self . ms_client . http_request ( 'GET' , suffix ) return self . pages_puller ( response , assert_pages ( pages_to_pull ) )
Returning all mails from given user
Returning all mails from given user
"""Returning all mails from given user

        Args:
            user_id (str):
            folder_id (str):
            search (str):
            odata (str):

        Returns:
            dict or list:
        """
dict or list.
dict or list .
self
user_id
str
None
folder_id
str
None
search
str
None
odata
str
None