Facing : Ex6F9304|Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|The operation couldn't be performed because object 'abc@jitter.com' couldn't be found on 'CY4PR15A005DC12.NAMPR15A005.PROD.OUTLOOK.COM

Vinay Sharma 51 Reputation points

Hi all,
I tried following the document: https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth but unable to get through this step: https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#register-service-principals-in-exchange.

When following : Register service principals in Exchange

I trying to execute below command :

Add-MailboxPermission -Identity "john.smith@contoso.com" -User 
Microsoft Exchange Online
{count} votes

3 answers

Sort by: Most helpful
  1. Vasil Michev 97,231 Reputation points MVP

    Is "john.smith@Company portal .com" a valid mailbox within your Office 365 tenant? What does Get-Recipient "john.smith@Company portal .com" show?

    0 comments No comments

  2. KyleXu-MSFT 26,211 Reputation points

    @Vinay Sharma

    Two thing you need to pay attentions to:

    You need to connect to Exchange online module with tenant admin account with have permission to find this mailbox and add permission it:

    Use command below to check whether could find this mailbox first as michev said:

    Get-Mailbox mymail@jitter.com  

    Then check whether this account has permission to run Add-MailboxPermission command (Tested with another user mailbox first):

    Add-MailboxPermission -Identity "mymail@jitter.com" -User "anotherUserMailbox" -AccessRights FullAccess   

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Laszlo Olasz 0 Reputation points

    Anyone know how to supress these errors in Azure Automation runbook ?

    It looks like they are being written to Output window, even if you catch them, out-null them, save them in your own ErrorVariable ... they just keep showing nevertheless as Output stream.

    0 comments No comments