Open jblyl opened 1 year ago
Don't know if it can help but I had a similar issue with a mailbox that was localized. the term Inbox was wrong for me as it was modified to my language term.
Unfortunately it doesn't. The mailboxes are english so Inbox is correct. The Inbox not being found is just on shared mailboxes, other normal mailboxes don't have an issue with Inbox. Custom folders aren't found either in all mailboxes.
Thank you for the suggestion though.
I found that the folder names are also case sensitive. I haven't tested with the main Inbox folder but have made separate folders under the root hierarchy for both the reports and archive folders, and this is working without issue. This in a shared mailbox.
here is my config that works
[mailbox]
watch = True
batch_size = 1000
reports_folder = Inbox
[msgraph]
auth_method = ClientSecret
client_id = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
client_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
tenant_id = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
mailbox =sharedmailbox@mydomain.com
If it can help
M365's Outlook mailbox inbox will change according to the account's local language settings. For example, it will be 'inbox' in English and '收信夾' in Chinese. So, if your default language is not English, you cannot specify 'inbox'.
I am using MSGraph with client secret and am trying to pull from a shared mailbox in o365.
My Config is:
And receive this error:
The inbox folder does exist. The application registration has the Mail.ReadWrite application permission as well as the Mail.ReadWrite, Mail.ReadWrite.Shared and User.Read delegated permissions and have been admin consented for the tenant.
Further, If I test with a non-shared mailbox, the Inbox will be found, but if the folder is changed to a non-default folder it will result in the same error. All folders are in the root of the hierarchy and are listed when checking them with the ExchangeOnline powershell module command
Get-MailboxFolderStatistics -Identity mailbox@mydomain.com | select Name, FolderId, FolderPath
Am I missing something?