Skip to content

parsedmarc.mail.graph 🔗

MSGraphConnection 🔗

MSGraphConnection(
    auth_method: str,
    client_id: str,
    client_secret: str,
    token_file: str,
    allow_unencrypted_storage: bool,
    username: str | None = None,
    password: str | None = None,
    tenant_id: str | None = None,
    mailbox: str | None = None,
)

Bases: MailboxConnection

MailboxConnection to a Microsoft account via the Micorsoft Graph API

PARAMETER DESCRIPTION
auth_method

TYPE: str

mailbox

TYPE: str | None DEFAULT: None

client_id

TYPE: str

client_secret

TYPE: str

username

TYPE: str | None DEFAULT: None

password

TYPE: str | None DEFAULT: None

tenant_id

TYPE: str | None DEFAULT: None

token_file

TYPE: str

allow_unencrypted_storage

TYPE: bool

fetch_messages 🔗

fetch_messages(reports_folder: str, **kwargs) -> list[str]

Returns a list of message UIDs in the specified folder

mark_message_read 🔗

mark_message_read(message_id: str)

Marks a message as read

watch 🔗

watch(check_callback, check_timeout)

Checks the mailbox for new messages every n seconds