Oct 27 2020 03:58 AM
Can I access (I like to save the email as a file) the mails in a mailbox online using Powershell via Exchange online?The necessary permissions are required.
Oct 27 2020 10:27 AM
You need to provide more context here, what exactly are you trying to achieve? Is this for your own mailbox or somebody else's? What operations will you need to perform on the items? Generally speaking, PowerShell will not help here, as it doesnt provide any item-level operations. You can however "wrap" EWS/Graph API code within PowerShell and do pretty much everything you want.
Oct 27 2020 10:49 AM
Many thanks for the answer.
Under the inbox a folder structure should be cleaned up
Inbox
abc
one
two
Now I want to look into every mailbox and do this with all emails in the folder "abc":
- save the email as MSG file in a folder structure
- edit the subject of the email with a marker
I have already implemented this with Powershell and Outlook. But I don't like the implementation because I would like to use it as a central service.
Oct 28 2020 12:42 AM
So yeah, the EWS API is what you should be looking for. To manage other mailboxes, you will need either Full Access permissions, or impersonation. You can call the EWS API from within PowerShell if needed.