Sirec
asked on
Unable to run calendar appointment deletion command
I am trying to delete an Office 365 user's calendar appointments in bulk using Powershell. This account was turned into a shared mailbox earlier this year.
I have tried the following command: Remove-CalendarEvents -Identity <MailboxIdParameter> -CancelOrganizedMeetings
And it produces the error attached in the text file.
I have also tried specifying the date and time range of cancellation/removal with no positive effect.
Could it be as obvious as turning it back into a normal mailbox?
Calendar-bulk-delete-error.txt
I have tried the following command: Remove-CalendarEvents -Identity <MailboxIdParameter> -CancelOrganizedMeetings
And it produces the error attached in the text file.
I have also tried specifying the date and time range of cancellation/removal with no positive effect.
Could it be as obvious as turning it back into a normal mailbox?
Calendar-bulk-delete-error.txt
It seems to work just fine for me for shared mailboxes, do attach the error you're getting. Alternatively, you can always use EWS to remove/cancel the meetings, here's a sample code: https://www.reddit.com/r/PowerShell/comments/7zqd2f/using_ews_and_powershell_to_cancel_meetings_in/
ASKER
Thanks, I have the error attached now to better understand my issue.
I am using a global administrator account to login. I should have full access to the mailbox as I have made changes to it through ECP in Exchange Online .
I am using a global administrator account to login. I should have full access to the mailbox as I have made changes to it through ECP in Exchange Online .
Interesting, it's failing with MapiExceptionSendAsDenied error, suggesting that you need to have Send As permissions on the mailbox. I will ping few Microsoft folks about this, afaik you dont need any additional permissions on the mailbox in order to run this cmdlet.
If you are in a hurry, I guess you can try adding Send As permissions and rerun the cmdlet.
If you are in a hurry, I guess you can try adding Send As permissions and rerun the cmdlet.
ASKER
Tried with setting Send As permissions to the account and still no luck - i look forward to any other information that you find out
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also are u running the command from O365 power-shell and are u connected using global admin credentials. Do you have full access on the mailbox.