Shared mailbox vs M365 group: check before adding Graph tools
An address that shows as a named recipient in Outlook (e.g. a team alias) can be a shared mailbox, not an M365 group. I wasted a re-consent cycle adding Group.Read.All group-conversation tools before learning that. Check cheaply first: list-groups filtered by mail returns nothing for a shared mailbox, and getMailTips totalMemberCount returns 1 for a mailbox vs N for a group or distribution list. Shared mailboxes are read via /users/{address}/messages with Mail.Read.Shared, which is user-consentable (no admin consent). Each scope change forces a new device-code login because the cached token lacks the new scopes, and device codes expire in about 15 minutes. For reply-audits, match intro emails to replies by conversationId AND by the counterparty's address or domain, because replies often split into new threads (deck emails, calendar invites). Exclude the Drafts folder, or unsent drafts count as replies.